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

Answer - Click Here:
C

2.C++ is a(n):
a.Object-oriented programming language.
b.Event-driven programming language.
c.Structured programming language.
d.None of these.

Answer - Click Here:
A

3.The arithmetic operators are:
a.Ternary operators
b.Unary operators
c.Binary operators
d.None of these

Answer - Click Here:
C

4.THe escape sequence for carrige return is:
a./t
b./f
c./n
d./r

Answer - Click Here:
D

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

Answer - Click Here:
B

6.WHat will be the value of ‘x’ after executing for(x=1;x<=15;x++);?
a.15
b.1
c.14
d.16

Answer - Click Here:
C

7.The pointers are used for implementing the concept of:
a.Polymorphism
b.Array
c.Structure
d.Inheritance

Answer - Click Here:
A

8.The function stlen(“ABC”);will return value:
a.4
b.ABC
c.3
d.None of these

Answer - Click Here:
C

9.The data item of a structured are called:
a.Fields
b.Elements
c.Members
d.ALl of these

Answer - Click Here:
D

10.In C++,the functions of a class are called:
a.Attributes
b.Methods
c.Member function
d.Both a and b

Answer - Click Here:
C

11.The derived class is also called:
a.parent class
b.sub class
c.child class
d.both b and c

Answer - Click Here:
D

12.Which of the following type of inheritance is commonly used:
a.private
b.public
c.protected
d.none of these

Answer - Click Here:
B

13.Polymorphism is achieved through:
a.destructor
b.constructor
c.virtual function
d.overloading operator

Answer - Click Here:
C

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

Answer - Click Here:
C

15.How many operations can be performe on stack:
a.4
b.5
c.3
d.2

Answer - Click Here:
D

16.Which of the following is used in recursion operation:
a.stack
b.deque
c.queue
d.tree

Answer - Click Here:
A

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

Answer - Click Here:
C

18.In binary I/O,the integer value 16324 will take:
a.5 bytes
b.6 bytes
c.4 bytes
d.2 bytes

Answer - Click Here:
D

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

Answer - Click Here:
A

20.Inheritance is the process of creating new classes called:
a.Super classes
b.Parent classes
c.Base classes
d.Derived classes

Answer - Click Here:
D

21.Which of the following function is a non-member function of a class?
a.Overridden function
b.Friend function
c.Constructor
d.Destructor

Answer - Click Here:
D

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

Answer - Click Here:
B

23.The null character is denoted by:
a.’/e’
b.’/n’
c.’/0′
d.0

Answer - Click Here:
C

24.Each element of array of character occupies:
a.one byte
b.four bytes
c.two bytes
d.None of the above

Answer - Click Here:
A

25.How many arithmetic operations can be performed on a pointer?
a.6
b.4
c.2
d.3

Answer - Click Here:
C

26.The only integer that can be assigned directly to a pointer is:
a.2
b.0
c.1
d.3

Answer - Click Here:
B

27.Which of the following loop structure has test condition after the body of loop?
a.do-while
b.while
c.for
d.None

Answer - Click Here:
A

28.Which of the following is a counter loop statement?
a.do-while
b.for
c.while
d.none

Answer - Click Here:
D

29.How many relational oprerators in C++?
a.2
b.4
c.6
d.3

Answer - Click Here:
C

30.Which of the following is a logical operator?
a.=
b.!=
c.==
d.!

Answer - Click Here:
D

31.A stream refers to:
a.flow of data
b.output statement
c.input statement
d.flow of program control709

Answer - Click Here:
A

32.A person that can write a computer program is called:
a.coder
b.programmer
c.analyst
d.coordinator
e.both c and d

Answer - Click Here:
B

33.The term mnemonic is used in:
a.C-language
b.Ada language
c.Assembly language
d.Machine language
e.none of these

Answer - Click Here:
C

34.In which year BCPL was developed:
a.1980
b.1970
c.1967
d.1972
e.None of these

Answer - Click Here:
C

35.Which of the following is the part of C++ compiler?
a. obj
b. .exe
c. .cpp
d. .h
e. none of these

Answer - Click Here:
D

36.The extension of C++ source program is:
a.ccp
b.cpp
c.exe
d.obj
e.none of these

Answer - Click Here:
B

36.Which operator is unary operator?
a.$$
b.>==
c.//
d.++
e.all of these

Answer - Click Here:
D

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

Answer - Click Here:
B

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

Answer - Click Here:
A

39.The escape sequence for carrige return is:
a./f
b./r
c./n
d./t
e.both c and d

Answer - Click Here:
b

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

Answer - Click Here:
A

41.Which of the following statement is a loop statement?
a.while
b.switch
c.if
d.if-else
e.both a and b

Answer - Click Here:
A

42.Which logical operator is unary operator?
a.//
b.!
c.&&
d.both a and b
e.none of the above

Answer - Click Here:
B

43.A pointer may be initialized to:
a.NULL
b.Adress of a variable
c.0
d.All of these

Answer - Click Here:
D

44.How many loop structure in C++?
a.4
b.2
c.1
d.3
e.none

Answer - Click Here:
D

45.Which of the following is an address operator?
a.!
b.*
c.&
d.&&
e. all of these

Answer - Click Here:
C

46.A pointer is a(n):
a.Data type
b.Variable
c.Operator
d.Keyword
e.both c and d

Answer - Click Here:
B

47.Which of the following is relational operator?
a.%
b.=
c.&&
d.==
e.all of these

Answer - Click Here:
C

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

Answer - Click Here:
E

49.The keyboard ‘friend’ is used to define a:
a.Friend class
b.Friend constructor
c.Friend function
d.Both a and b

Answer - Click Here:
D

Topic Covered

Top 50 Programming  C++ Solved MCQs Questions Answers.

Programming C Plus Plus MCQs Homepage

shamil memory table

Computer Science Repeated MCQs Book Download

 

Add a Comment