0% found this document useful (0 votes)
13 views

c++

Cpp imp questions
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

c++

Cpp imp questions
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C++ Important Questions

1. State any six principal advantages of object-oriented programming.


2. Explain the syntax of C++ program structure with an example.
3. Write the size in bytes of following data types :
4. Difference traditional & procedural and object oriented programming
5. Operators in c++.
6. Explain basic type to Class Type Conversion with an example.
7. What is Class? Explain the general form of class declaration.
8. Explain how function of a class can be defined outside the class definition and inside the class
definition with example in C++.
9. Explain different types of inheritance with a suitable diagram.
10. What is Friend Function? Write four rules for friend function.
11. Static data members function in class
12. Explain the use of scope resolution operator and memory management operators in C++ with
examples.
13. Explain operator overloading with a suitable example. Write any two characteristics of operator
overloading.
14. Explain the concept of function overloading with an example.
15. What is Polymorphism? Explain the different types of Polymorphism with examples.
16. What is polymorphism? Explain how it is achieved by: (i) Compile-time (ii) Run Time
17. What is a Virtual Function? Write any six syntax rules of Virtual Function.
18. What is a pointer in C++? Give the advantages of using pointers.(call by value & call by
reference program)
19. What is constructor and destructor? Explain each with the help of a suitable example.
20. Define following terms in C++ file handling.
(i) Ifstream
(ii) Ofstream
(iii) Fstream
21. Explain following functions related to file handling in C++.

(i) seekg ()
(ii) tellg ()
(iii) eof()
(iv) open()
22. Define following
(i) Objects
(ii) Classes
(iii)Data encapsulation
(iv) Data abstraction
(v) Data hiding
Programs

1. Write a C+ program which finds a fibonacci series of n'' terms.


2. Write a C+ program to find factorial of a number during execution by using constructor function. (Also
learn how to do without using constructor)
3. Write C++ program to read any integer and then check whether it's prime or not prime no.
4. Write a function in C++ to accept 10 integers. Find the smallest integer and print it. (Also learn for how
to find largest)
5. Write class based C + + program to accept two integers and find it’s G.C.D. (Greatest Common Divisor).
6. Write a C++ program to accept 10 integers in an array and find its sum and average.

You might also like