0% found this document useful (0 votes)
305 views2 pages

C++ questions for practical

C++ questions for practical

Uploaded by

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

C++ questions for practical

C++ questions for practical

Uploaded by

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

C++ assignments Question

1. Write a C++ program to find the largest element of a given 1-D array of
integers.?
2. Write a C++ program to separate even and odd numbers of an array of
integers. Put all even numbers first, and then odd numbers.?
3. write a C++ program to searching in 1 D-array?
4. Write a program to print count of prime number in 1-D array?
5. Write a program to prints sum of digits in 1-D array?
6. Write a program to sort array elements in descending order?
7. Write a program to prints reverse number in 1-D array?
8. Write a program to prints perfect number in 1-D array?
9. Write a program to prints sum of array elements in 1-D array?
10. What is an object? Explain how objects in 8 C++ are created and destroyed,
with the help of program to create Bank-Account Class, having data
member’s name, account number, balance and member function display
balance.

11.What is access control specifies? Explain 5 the need of different access


control specifies with example.
12.Write a C++ program to create a class Book, to keep the records of books
available in your library. This program should have proper constructor and
member functions, to get the details such as publisher, author and price etc.
of the books. Make necessary assumptions where ever required.
13.What is function overloading? Explain its advantage with the help of an
example.
14.What is constructor? Explain advantage 5 of constructor with the help of an
example.
15.What is static member? Explain use of static 10 data member and static
member function with the help of an example program in C++.
16.Describe the concept of classes and objects through examples.
17.Write a C++ program to print Student details: Student Name, Father's Name,
Mother's Name, Student Address, Zip code, Student Roll No. using
constructor and destructor.
18.w hat is an object in C++ ? Explain how an object can be passed as an
argument to a function with the help of an example.
19.Differentiate between default constructor and parameterized constructor with
the help of an example.
20.Ex. Of declaring inline function within class.

You might also like