Top 50 Programming C++ Solved MCQs Questions Answers
Top 50 Programming C++ Solved MCQs Questions Answers
If you decided to prepare yourself for programming exam, then these 50 important MCQs will help You a lot.
1.In flowchart rectangle symbol indicates:
a.Input/Output
b.Connector
c.Process
d.Decision
2.C++ is a(n):
a.Object-oriented programming language.
b.Event-driven programming language.
c.Structured programming language.
d.None of these.
3.The arithmetic operators are:
a.Ternary operators
b.Unary operators
c.Binary operators
d.None of these
4.THe escape sequence for carrige return is:
a./t
b./f
c./n
d./r
5.In switch structure, each case label may be an integer constant or:
a.Real constant
b.Character constant
c.String constant
d.None of these
6.WHat will be the value of ‘x’ after executing for(x=1;x<=15;x++);?
a.15
b.1
c.14
d.16
7.The pointers are used for implementing the concept of:
a.Polymorphism
b.Array
c.Structure
d.Inheritance
8.The function stlen(“ABC”);will return value:
a.4
b.ABC
c.3
d.None of these
9.The data item of a structured are called:
a.Fields
b.Elements
c.Members
d.ALl of these
10.In C++,the functions of a class are called:
a.Attributes
b.Methods
c.Member function
d.Both a and b
11.The derived class is also called:
a.parent class
b.sub class
c.child class
d.both b and c
12.Which of the following type of inheritance is commonly used:
a.private
b.public
c.protected
d.none of these
13.Polymorphism is achieved through:
a.destructor
b.constructor
c.virtual function
d.overloading operator
14.Which of the following strem class is used to perform both input and output file operation:
a.ofstream
b.ifstream
c.fstream
d.iostream
15.How many operations can be performe on stack:
a.4
b.5
c.3
d.2
16.Which of the following is used in recursion operation:
a.stack
b.deque
c.queue
d.tree
17.In order traversal:
a.Right sub-tree is visited first in inorder
b.Root is visited first
c.Left sub-tree is visited in inorder
d.None of the above
18.In binary I/O,the integer value 16324 will take:
a.5 bytes
b.6 bytes
c.4 bytes
d.2 bytes
19.A class that has at least one pure virtual function is called:
a.Abstract class
b.Super class
c.Concrete class
d.Derived class
20.Inheritance is the process of creating new classes called:
a.Super classes
b.Parent classes
c.Base classes
d.Derived classes
21.Which of the following function is a non-member function of a class?
a.Overridden function
b.Friend function
c.Constructor
d.Destructor
22.When accessing pof a structure member,the identifier to the left of the dot operator is the name of:
a.a structure tag
b.a structure variable
c.the keyword struct
d.a structure member
23.The null character is denoted by:
a.’/e’
b.’/n’
c.’/0′
d.0
24.Each element of array of character occupies:
a.one byte
b.four bytes
c.two bytes
d.None of the above
25.How many arithmetic operations can be performed on a pointer?
a.6
b.4
c.2
d.3
26.The only integer that can be assigned directly to a pointer is:
a.2
b.0
c.1
d.3
27.Which of the following loop structure has test condition after the body of loop?
a.do-while
b.while
c.for
d.None
28.Which of the following is a counter loop statement?
a.do-while
b.for
c.while
d.none
29.How many relational oprerators in C++?
a.2
b.4
c.6
d.3
30.Which of the following is a logical operator?
a.=
b.!=
c.==
d.!
31.A stream refers to:
a.flow of data
b.output statement
c.input statement
d.flow of program control709
32.A person that can write a computer program is called:
a.coder
b.programmer
c.analyst
d.coordinator
e.both c and d
33.The term mnemonic is used in:
a.C-language
b.Ada language
c.Assembly language
d.Machine language
e.none of these
34.In which year BCPL was developed:
a.1980
b.1970
c.1967
d.1972
e.None of these
35.Which of the following is the part of C++ compiler?
a. obj
b. .exe
c. .cpp
d. .h
e. none of these
36.The extension of C++ source program is:
a.ccp
b.cpp
c.exe
d.obj
e.none of these
36.Which operator is unary operator?
a.$$
b.>==
c.//
d.++
e.all of these
37.a++ statement, is equivalent to:
a.a=a+a
b.a=a+1
c=.a=++a+1
d.both b and c
e. none of these
38. The cerr is a(n):
a.output stream object
b.built-in error function
c.keyword
d.input stream object
e.all of these
39.The escape sequence for carrige return is:
a./f
b./r
c./n
d./t
e.both c and d
40.A relational operator :
a. Comapares two operands.
b.assign one operand to another
c.logically combines two operands
d.adds two operands.
e.none of these
41.Which of the following statement is a loop statement?
a.while
b.switch
c.if
d.if-else
e.both a and b
42.Which logical operator is unary operator?
a.//
b.!
c.&&
d.both a and b
e.none of the above
43.A pointer may be initialized to:
a.NULL
b.Adress of a variable
c.0
d.All of these
44.How many loop structure in C++?
a.4
b.2
c.1
d.3
e.none
45.Which of the following is an address operator?
a.!
b.*
c.&
d.&&
e. all of these
46.A pointer is a(n):
a.Data type
b.Variable
c.Operator
d.Keyword
e.both c and d
47.Which of the following is relational operator?
a.%
b.=
c.&&
d.==
e.all of these
48.In following statement which statement are correct?
a.char *X3=”ABC”;
b.char X1[]=”ABC”;
c.char X2[5]=”ABC”;
d.both b and c
e.None of these
49.The keyboard ‘friend’ is used to define a:
a.Friend class
b.Friend constructor
c.Friend function
d.Both a and b
Topic Covered
Top 50 Programming C++ Solved MCQs Questions Answers.
Programming C Plus Plus MCQs Homepage
- Low-level and high-level languages MCQs
- Procedural and non Procedural languages MCQs
- C++ STANDARD LIBRARY MCQs
- Array MCQs
- Arrays MCQs 2
- Pointers Solved MCQs
- Inline Function MCQs – C++
- Top 50 Programming C++ MCQs
- MCQs of introduction to programming
- Past Papers 2022 C++ MCQs
- Past Papers 2021 C++ MCQs
- Past Papers 2020 C++ MCQs
- Past Papers 2019 C++ MCQs
- Highly Recommended C++ Important MCQs with Explanation
- OOP
- OOP intro & examples MCQs
- Classes and Inheritance MCQs
- Friend Function MCQs
- Virtual Function MCQs
- Polymorphism MCQs
- Polymorphism MCQs 2