You are on page 1of 13

Practical File

B.Sc. 2nd year


Subject: Programming in C++ and HTML
Session: 2022-23
Roll No:

Submitted to: Submitted by:


Ms. Rishi Pandey Diwanshi Lonhare

Ms. Rishi Pandey Dr. M.S. Mishra


HOD Principal

MAHARAJA AGRASEN INTERNATIONAL COLLEGE


(Affiliated to Pt. Ravishankar Shukla University, Raipur (C.G.))
NAAC Accredited B+
Shree Ramnath Bhimsen Marg, Samta Colony, Raipur (C.G.)
Telephone No: 0771-4024459, 4066664
Website: www.maicindia.org
Practical File
B.Sc. 2nd year
Subject: Programming in C++ and HTML
Session: 2022-23
Roll no:

Submitted to: Submitted by:


Ms. Rishi Pandey Diwanshi Lonhare

Ms. Rishi Pandey Dr. M.S.Mishra


HOD Principal
Mr.Bhavesh Rathod
Lab coordinator
MAHARAJA AGRASEN INTERNATIONAL COLLEGE
(Affiliated to Pt. Ravishankar Shukla University, Raipur (C.G.))
NAAC Accredited B+
Shree Ramnath Bhimsen Marg, Samta Colony, Raipur (C.G.)
Telephone No: 0771-4024459, 4066664
Website: www.maicindia.org
ACKNOWLEDGEMENT
I would like to express my special thanks of gratitude
to my teacher MS.RISHI PANDEY as well as our
principal Dr. m.s. mishra who gave me the golden
opportunity to do this wonderful practical file on
COMPUTER SOFTWARE which also helped me in doing
a lot of research and I came to know about so many
new things I am really thankful to them.
Secondly, I would also like to thank my parents and
friends who helped me a lot in finishing this practical
file within the limited time. I am making this practical
file not only for marks but also to increase my
knowledge.

Diwanshi
INDEX OF PRACTICALS IN HTML
S.No. PROGRAMS PG.No. REMARKS
1. Write an HTML program to create the table as given
below:-

2. Write an HTML program to demonstrate hyperlinking


between two web pages. Create a marquee and also insert
an image in the page.

3. Write an HTML program to create frames in HTML with


three columns (width=30%, 30%, 40%).
S.No. PROGRAMS PG.No. REMARKS

4. Write an HTML program to create the following table:-

5. Write an HTML program to create the following table:-


S.No. PROGRAMS PG.No. REMARKS

6. Write an HTML program to create the following table:-

7. Create a web page with


information on the
following topics:-
(a)Your Name
(b)Address
(c)Date of Birth
(d)Hobbies
(e)Favorite pass-time
(f)Ideals
(g)Favorite Music
(h)Favorite Films.
S.No. PROGRAMS PG.No. REMARKS
8. Write an HTML program to create a web page with an
image as background and the following text: (Keep font
size and type according to your choice)
New Delhi:-
New Delhi, the capital of India is a fusion of the ancient
and modern. The refrains of the Muslim dynasties with its
architectural delight, give the majestic ambience of the
bygone era.
On the other side of New Delhi, the imperial city build by
British, reflect the fast paced present. The most fascinating
of all is the character of Delhi whichvaries from 13𝑡ℎ present
century mausoleum of the Lodi Kings to ultra modern glass
skyscrapers.

9. Write an HTML program for the following equations:-


(a.)𝐶2𝐻5𝑂𝐻+𝑃𝐶𝑙3= 𝐶2𝐻5𝐶𝑙+𝑃𝑂𝐶𝑙3+ 𝐻𝐶𝑙
(b.)4𝐻3𝑃𝑂3=3𝐻3𝑃𝑂4+ 𝑃𝐻3
(c.)𝑃𝐶𝑙3+ 𝐶𝑙2=𝑃𝐶𝑙5
S.No. PROGRAMS PG.No. REMARKS
10. Write an HTML program to create the following table:-

11. Create the following HTML form:-


S.No. PROGRAMS PG.No. REMARKS
12. Write an HTML code to display the following:-
INDEX OF PRACTICALS IN C++
S.No. PROGRAMS PG.No. REMARKS
1. Write a program to generate following patterns:- 1
(a.) *
**
***
****
*****
******
(b.) 1 1
12 21
123 321
1234 4321
12345 54321
(c.) A
ABA
ABCBA
ABCDCBA
ABCDEDCBA
2. Write a program to overload function “area” to find
area of triangle, rectangle, square and circle.

3. Write a program using functions to add and multiply


two matrices of order 3*3. You have to create one
function for addition, which accepts three array
arguments. First two array arguments are matrices to
add and third matrix is destination where the resultant
of addition of first two matrices is stored. In the similar
way create functions for matrix multiplication.

4. Create a single program to perform following tasks


without using library functions:-
a) To reverse the string accepted as arguments.
b) To count the number of characters in string passed as
arguments.
c) To copy one string to another string,passed as an
argument.
S.No. PROGRAMS PG.No. REMARKS
5. Create a class “Student” having data members to store
roll number, name of student, name of three subjects,
maximum marks, minimum marks and obtained marks.
Declare an object of Student. Provide facilities to input
data members and display result of the student.

6. Create a class “Sarray” having an array of integers


with 5 elements as data members. Provide following
facilities:-
a) constructor to get number in array elements.
b) sort the elements.
c) search for presence of particular value in array
element.
7. Create a class “Sample” with member function for
following tasks:-
a) To find factorial by recursive member function.
b) To check whether a number is prime or not.
c) To generate Fibonacci series upto requested terms.
8. Write a program to create class “Complex” having data
members to store real and imaginary part, with
following facilities:-
a) Add two complex numbers using objects.
b) Subtract two complex numbers using objects.
c) Multiply two complex numbers using objects.
9. Write a program to create class “Distance” having data
members feet and inch. It contains member functions
for taking input of data members and member functions
for displaying value of data members. Class Distance
contains declaration of friend function “add” which
accepts two objects of class distance and return object
of class distance after addition. Class distance contain
declaration of another friend function “subtract” that
accepts two objects of class distance and return object
of class distance after subtraction. Test the class using
main function and object of class distance.
S.No. PROGRAMS PG.No. REMARKS
10. Write a program to create class “mother” having data member
to store salary of mother, create another class “father” having
data member to store salary of father. Write a friend function,
which accepts objects of class mother and father and prints
sum of salary of mother and father objects.
11. Write a Program to create a class “polar” which has
data members radius and angle. Define overloaded
constructor to initialize object and copy constructor to
initialize one object by another existing object. Test
function of the Program in main function.
12. Write a class having name calculate that uses static
overloaded function to calculate area of circle, area of
rectangle and area of triangle.

13. Create a class “amount” having data members – rupee


and paise. Provide following facilities:-
a) Overload operator „+‟ to add two amounts using
object of class polar.
b) Overload operator „==‟ to compare whether first
amount object is greater than second amount object.
c) Overload operator „<‟ to compare whether first
amount object is less than second amount object.
d) Overload operator „!=‟ to compare whether first
amount object is not equal to second amount object or
not.
14. Write a Program having void pointer to store addresses
of integer, character and float variables. Print values of
integer, character and float variables using void pointer.
15. Write Program to find biggest number among three
numbers using pointer and function.
16. Write Program to find biggest number among three
numbers using pointer and function.
17. Write a Program to create a class “employee” having
data members name of employee, employee id and
salary and member functions for data input and output.
Use pointer to object to simulate array of object to store
information of 3 employees.
S.No. PROGRAMS PG.No. REMARKS
18. Write a Program using inline function to calculate
square of entered number.

19. Create a class “circle” with data members – radius.


Provide member function to calculate area. Derive a
class “sphere” from the class “circle”. Provide member
function to calculate volume. Derive class “cylinder”
from class “sphere” with additional data member –
height and member function to calculate volume.

20. Design three classes - student, result and exam. The


“student” class has data member – roll number, name
of student. Create a class “exam” which contains data
members – name of subject, minimum marks,
maximum marks, obtained marks for three subjects.
Derive class “result” from both the “student” and
“exam” classes for displaying the result of the student

21. Create an abstract base class “shape” having two data


members and two member functions- getdata (normal
member function) and printarea (pure virtual
function). Derive classes “triangle” and “rectangle”
from class “shape” and redefine member function
printarea in both classes- triangle and rectangle.

22. Create classes “alpha” and “beta” with one data


member each. Derive a class “gamma” from “alpha”
and “beta” with additional two data members. Write
constructor function for class “gamma” to initialize
data member of alpha, beta and gamma classes.

You might also like