0% found this document useful (0 votes)
22 views3 pages

C++ Questions

This document is an examination paper for a C++ programming module, consisting of various types of questions including fill in the blanks, true/false statements, differences between programming concepts, and descriptive questions. It also includes programming tasks that require writing C++ code for specific functionalities. The total marks for the exam are 100, and students are instructed to enclose the question sheet with their answers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views3 pages

C++ Questions

This document is an examination paper for a C++ programming module, consisting of various types of questions including fill in the blanks, true/false statements, differences between programming concepts, and descriptive questions. It also includes programming tasks that require writing C++ code for specific functionalities. The total marks for the exam are 100, and students are instructed to enclose the question sheet with their answers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

MODULE: Programming in ‘C++’ (Final) Full Marks: 100

NAME: - Time: 2 hours


BATCH: -
DATE: -

Q1. Fill in the Blanks (1 x 10 = 10)

a) The smallest individual unit in a program is known as a _________.


b) The two major components of objects are ________.
c) A function name must follow _________ symbol.
d) C++ developed by ____________.
e) The last character of a string is _________.
f) A function calls itself is called ___________function.
g) A constructor name is same as ___________name.
h) A derived class inherits form _____________ class.
i) A child class is said to be___________from a base class.

Q2. True and False (1 x 10 = 10)

a) Cout is an object of Ostream class.


b) A Constructor never returns a value.
c) By default all members are public in a class.
d) In a class data member are always Private, whereas member functions are always
public.
e) C++ is not an object oriented programming language.
f) Pre fix is a++ and Postfix is ++a.
g) A base class is called a derived class.
h) Early binding is called Static binding.
i) The continue statement is used to terminate the control from the loop.
j) Clrscr function is available in conio.h header file.

Q3.Difference Between (any five) (2 x5 =10)

a) Structural & Object Oriented programming language


b) Class and object
c) Operator Overloading & Function Overloading
d) Constructor & Destructor.
e) . Cin and Cout.
f) Inline Function& Friend Function.
g) Wild pointer & Void pointer.

Contd./p-2
Page-2

Q4. Answer any Five Questions (4x5 =20)


a) What is Constructor? And its rules.
b) What is Inheritance? Difference between Single Inheritance and Multiple
inheritances.
c) What is polymorphism? List the pros and cons of using polymorphism in object-
oriented programming?
d) What is overloading of functions?
e) What is class? How it differ from structure.
f) What is scope resolution operator? How is it useful for defining the data member
and member function of a class?

5Q. Write the answer of the following programs (Answers any five) (10 x 5=50)

1. Write a Program in c++ enter two number and find out different calculation using
different sub functions such as addition, subtraction, multiplication and division.

2. A program to read data such as name, roll number, sex, height, and weight from the
keyboard and display the contents of the class on the screen using single inheritance
concept, which consists of a base class and a derived class.

3. A program to generate a series of fibonacci numbers using the constructor where the
constructor member function has been defined in the scope of class definition itself.
4. Write a Program to creat multilevel inheritance. Creat classes A1, A2 and A3.
5. Write a Program in c++ Enter the number to check this number is a prime number
or not a prime number.
6. Write a program in c++ enter a student name, mark and address on screen but that
store in a file.
7. Write a program in c++ invocation of constructors and destructors.

*****….*****

Note: - Enclose question sheet with your answer sheet. Write


down the short questions (1& 2) on question sheet.

(Best of luck)

You might also like