KEMBAR78
C Programs List in Board Paper | PDF | C++ | Class (Computer Programming)
0% found this document useful (0 votes)
49 views9 pages

C Programs List in Board Paper

Uploaded by

ria6vikam15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views9 pages

C Programs List in Board Paper

Uploaded by

ria6vikam15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

2018-winter

1. Write a C++ program to accept array of five elements, find and


display smallest number from an array
2. Write a C++ program to declare a class ‘College’ with data
members as name and college code. Derive a new class ‘student’
from the class college with data members as sname and roll no.
Accept and display details of one student with college data.
3.Write a C++ program to declare a class ‘circle’ with data
members as radius and area. Declare a function getdata to accept
radius and putdata to calculate and display area of circle.
4.Write a C++ program to declare a class addition with data
members as x and y. Initialize values of x and y with constructor.
Calculate addition and display it using function ‘display’.
5. Virtual base class , static data member
6.Write a C++ program to implement inheritance shown in
following figure:

Accept and display data of one teacher and one student using
object of class ‘Info’.
6. Write a C++ program to print multiplication table of 7.
(example: 7 x 1 ….7 x 10 = 70).
7. Write a C++ program to swap two integer numbers and swap two
float numbers using function overloading.
8. Write a C++ program to count number of spaces present in
contents of file.
9. Write a C++ program to find greatest number among two
numbers from two different classes using friend function.

10. Write a C++ program to overload binary operator ‘+’ to


concatenate two strings.

11. Write a C++ program to write ‘Welcome to poly’ in a file. Then


read the data from file and display it on screen.

12. Write a C++ program to declare a class ‘Account’ with data


members as accno, name and bal. Accept data for eight accounts
and display details of accounts having balance less than 10,000.

13. (i) Write a C++ program to find whether the entered number is
even or odd.
(ii) Write a C++ program to declare a structure employee with
members as empid and empname. Accept and display data for
one employee using structure variable.

14. Write a C++ program to implement following inheritance.

Accept and display data for one programmer and one manager.
Make display function virtual.

15. Write a C++ program for following multilevel inheritance.

Accept and display data for one car with all details.
2019-summer

1. Write a ‘C++’ program to find factorial of given number using loop.


(if user input 1 and 0 the conditions must be putted the same wise)

2. Write a C++ program to declare a class COLLEGE with members as college code.
Derive a new class as STUDENT with members as studid. Accept and display details of
student along with college for one object of student. (Note: Any other correct logic
shall be considered)

3. Write a C++ program to find smallest number from two numbers using friend
function. (Hint: use two classes).

4. Write a C++ program to create a class STUDENT The data members of STUDENT class.
Roll_No ,Name ,Marks.

5. Accept data for five students and display it. Write a C++ program to display sum of
array elements of array size n.

6. Write a program to implement multiple inheritance as shown in following Figure


No.1:

7. Write a C++ program to count number of spaces in text file.

8. Write a program in C++ to overload unary ‘_’ operator to negate values of data
members of class.

9. Write a C++ program to append data from abc.txt to xyz.txt file.

10.Write a C++ program to declare a class student with members as roll no, name and
department. Declare a parameterized constructor with default value for department
as ‘CO’ to initialize members of object. Initialize and display data for two students.

11.Write a C++ program to add two 3 x 3 matrices and display addition.


12.Write a program to swap two integers using call by reference method.

13.Write a C++ program to implement following in heritance. Refer Figure No.2:


Accept and display data for one object of class result (Hint: use virtual base class).
2019-Winter

1. Write a program to implement single inheritance from the following Refer Figure No.1

2. Program to interchange values of two integer numbers using friend function.

3. Write a program to count the number of lines in file.

4. Write a program to declare a class ‘student’ having data members as ‘stud_name’ and
‘roll_no’. Accept and display this data for 5 students.

5. Write a program to declare a class ‘book’ containing data members as ‘title’, ‘author-
name’, ‘publication’, ‘price’. Accept and display the information for one object using
pointer to that object.

6. Write a program that copies contents of one file into another file.

7. Write a program to implement the following hierarchy using suitable member


functions. Refer Figure No.2.

8. Write a program to overload the ‘—’ unary operator to negate the values.
2022-summer

1. Write a C++ program to declare a class college with name and code. Derive a new
class as student with members as name. Accept and display details of one student
along with college data.

2. Write a C++ program to declare a class student with data members as roll no and
name. Declare a constructor to initialize data members of class. Display the data.

3. Write a C++ program to declare a class mobile having data members as price and
model number. Accept and display the data for Ten objects.

4. Write a C++ program to copy the contents of a source file student 1.txt to a
destination file student 2.txt using file operations.

5. Write a C++ program to overload add function to add two integer numbers and two
float numbers.

6. Write a C++ program to find and display the smallest number of an array.

7. Write a C++ program to declare a structure book with members as book id and name.
Accept and display data of five books using array of structure.

8. Write a C++ program to declare a class train with members as train no and name.
Accept and display data for one object of train. Use pointer to object to call functions
of class.

9. Write a C++ program to implement following inheritance: Refer Fig. No. 1.

Accept and display total of one object of result.


10.(Hint : class 1 contains m1 and class 2 contains m2)
Write a C++ program to declare two classes with data members as m1 and m2
respectively. Use friend function to calculate average of two (m1, m2) marks and
display it.

11.Write any two characteristics of static data member. Write C++ program to count
number of objects created with the help of static data member.

12.Write a C++ program to overload “+” operator so that it will perform concatenation of
two strings. (Use class get data function to accept two strings).

13.Write a program to implement inheritance as shown in figure No. 2. Assume suitable


member function.
2022-winter

1. Develop a c++ program to print Fibonacci series.

2. Develop a c++ program for multilevel inheritance.

3. Develop a c++ program for accept data from user to calculate percentage for 5
subject and display grade according to percentage.

4. Develop c++ program to open and read content of file also write “object oriented”
string in file and close it.

5.

6. Develop a c++ program to print sum of 10 no. using array.

7. Develop a c++ program to perform arthmatic operation using pointer.

8. Develop a c++ program to create structure student with data member Name, Roll
No., percentage accept and display data for 5 student using structure.

9. Develop c++ program to check Detection of end of file.

10.Define class book with following Data member and member function for 10 book.
Data Member Member Function
1. B - name → getdata ( )
2. B - author → put data ( )
3. B – price

11.Develop a c++ program for constructor with default argument and use of destructor.
12.Describe Function overloading with suitable program

13.Develop c++ program to implement inheritance shown in fig.

You might also like