C++ OOP MCQ
C++ OOP MCQ
2. Which of the following is the correct syntax of including a user defined header
files in C++?
a) #include [userdefined]
b) #include “userdefined”
c) #include <userdefined.h>
d) #include <userdefined>
13. Which concept allows you to reuse the written code in C++?
a) Inheritance
b) Polymorphism
c) Abstraction
d) Encapsulation
15. If we stored 5 elements or data items in an array, what will be the index
number of the array's last data item?
a) 3
b) 5
c) 4
d) 88
16. Which one of the following given statements is correct about the increment
operator?
17. In C++, can a for loop statement contain another for loop statement?
a) No
b) Yes
c) Runtime error
d) None of the above
a) ;
b) :
c) ;;
d) }
19. Inside a structure, the declared data members are known as____
a) Data
b) Object & data
c) Members
d) None of the above
a) Assembler
b) Interpreter
c) Compiler
d) Both Interpreter and Compiler
a) True
b) False
a) Division Operator
b) Modulus Operator
c) Percentage Operator
d) None of the above
a) +=
b) !=
c) ::
d) ?:
a) ::
b) ?:
c) ->
d) .
25. Can we use the string in the Switch statement for case selection?
a) True
b) False