New MCQ Questions set with Answer on the category of C/C++
Programming Language. In this set you will get 30 Objective
Questions with Answer related to C/CPP Programming Language.
Four options are given to each questions as possible answer but only one option
is the correct one, first select
your answer and tally with the given correct answer. Correct Answer
are given below of this MCQ
Question Set.
1. C++ was originally developed by
A. Nicolas Wirth
B. Donald Knuth
C. Bjarne Stroustrup
D. Ken Thompson
2. The standard C++ comment
A. /
B. //
C. /* and */
D. None of these
3. The preprocessor directive #include is required if
A. Console output is used
B. Console input is used
C. Both console input and output is used
D. None of these
4. The operator << is called
A. an insertion operator
B. put to operator
C. either a or b
D. None of these
5. The operator >> is called
A. an extraction operator
B. a get from operator
C. either a or b
D. get to operator
6. The C++ symbol <<
A. perform the action of sending the value of expression listed as its right to the
outputs strewn as the left.
B. is used to indicate the action from right to left
C. is adopted to resemble an arrow
D. All of above
7. When a language has the capability to produce new data type, it is called
A. Extensible
B. Overloaded
C. Encapsulated
D. Reprehensible
8. C++ name was suggested by
A. Rrick Mascitti
B. Bjarne Stroustrup
C. Donald Knuth
D. Ken Thompson
9. What is a reference?
A. an operator
B. a reference is an alias for an object
C. used to rename an object
D. None of these
10. State the object oriented languages
A. C++
B. Java
C. Eiffel
D. All of the above
11. A constructor is called whenever
A. a object is declared
B. an object is used
C. a class is declared
D. a class is used
12. Overload function in C++
A. a group function with the same name
B. all have the same number and type of arguments
C. functions with same name and same number and type of arguments
D. All of the above
13. Operator overloading is
A. making C++ operators works with objects
B. giving new meaning to existing C++ operators
C. making new C++ operator
D. both a & b above
14. A constructor is called whenever
A. a object is declared
B. an object is used
C. a class is declared
D. a class is used
15. A class having no name
A. is not allowed
B. can’t have a constructor
C. can’t have a destructor
D. can’t be passed as an argument
16. The differences between constructors and destructor are
A. constructors can take arguments but destructor can’t
B. constructors can be overloaded but destructors can’t be overloaded
C. both a & b
D. None of these
17. A destructor takes
A. one argument
B. two arguments
C. three arguments
D. Zero arguments
18. Constructors are used to
A. initialize the objects
B. construct the data members
C. both a & b
D. None of These
19. In C++ a function contained within a class is called
A. a member function
B. an operator
C. a class function
D. a method
20. The fields in a class of a C++ program are by default
A. protected
B. public
C. private
D. None of these
21 “C” was primarily developed as a
a. Systems Programing Language
b. General Purpose Language
c. Data Processing Language
d. None of the above
22 “C” is a
a. High Level Language
b. Low Level Language
c. High Level Language with some low level features
d. Low level language with some high level features
23 Most suitable option for “C” literal is:
a. a string
b. a string constant
c. a character
d. an alphabet
24 Length of the string “Correct” is
a. 7
b. 8
c. 6
d. implementation dependent
25 Choose the correct statement
a. An identifier may start with an underscore
b. an identifier may end with an underscore
c. IF is a valid identifier
d. All of the above
26 The “const” feature can be applied to
a. an identifier
b. an array
c. an array argument
d. All of the above
27 Pick the operator that associate from the left
a. +
b. ,
c. <
d. All of the above
28 Choose the correct statement
a. Constant expressions are evaluated at compile time
b. String constants can be concatenated at compile time
c. Size of array must be known at compile time
d. All of the above
29 Pick the operator that associate from the right
a. ?:
b. +=
c. =
d. All of the above
30 Which of the following comments about the “++” operator are correct?
a. It is a unary operator
b. It cannot be applied to an expression.
c. It associates from the right.
d. All of the above
Answers
1 – C / 2 – B / 3 – C / 4 – C / 5 – C / 6 – D / 7 – A / 8 – A / 9 – B / 10 – D
11 – A / 12 – A / 13 – D /1 4 – A / 5 – C / 16 – C / 17 – D /1 8 – A / 19 – A / 20 – C
21 – A /2 2 – C / 23 – B / 24 – A / 25 – D / 26 – D / 27 – D / 28 – D / 29 – D / 30 – D
1. C++ was originally developed by
A. Nicolas Wirth
B. Donald Knuth
C. Bjarne Stroustrup
D. Ken Thompson
2. The standard C++ comment
A. /
B. //
C. /* and */
D. None of these
3. The preprocessor directive #include is required if
A. Console output is used
B. Console input is used
C. Both console input and output is used
D. None of these
4. The operator << is called
A. an insertion operator
B. put to operator
C. either a or b
D. None of these
5. The operator >> is called
A. an extraction operator
B. a get from operator
C. either a or b
D. get to operator
6. The C++ symbol <<
A. perform the action of sending the value of expression listed as its right to the
outputs strewn as the left.
B. is used to indicate the action from right to left
C. is adopted to resemble an arrow
D. All of above
7. When a language has the capability to produce new data type, it is called
A. Extensible
B. Overloaded
C. Encapsulated
D. Reprehensible
8. C++ name was suggested by
A. Rrick Mascitti
B. Bjarne Stroustrup
C. Donald Knuth
D. Ken Thompson
9. What is a reference?
A. an operator
B. a reference is an alias for an object
C. used to rename an object
D. None of these
10. State the object oriented languages
A. C++
B. Java
C. Eiffel
D. All of the above
11. A constructor is called whenever
A. a object is declared
B. an object is used
C. a class is declared
D. a class is used
12. Overload function in C++
A. a group function with the same name
B. all have the same number and type of arguments
C. functions with same name and same number and type of arguments
D. All of the above
13. Operator overloading is
A. making C++ operators works with objects
B. giving new meaning to existing C++ operators
C. making new C++ operator
D. both a & b above
14. A constructor is called whenever
A. a object is declared
B. an object is used
C. a class is declared
D. a class is used
15. A class having no name
A. is not allowed
B. can’t have a constructor
C. can’t have a destructor
D. can’t be passed as an argument
16. The differences between constructors and destructor are
A. constructors can take arguments but destructor can’t
B. constructors can be overloaded but destructors can’t be overloaded
C. both a & b
D. None of these
17. A destructor takes
A. one argument
B. two arguments
C. three arguments
D. Zero arguments
18. Constructors are used to
A. initialize the objects
B. construct the data members
C. both a & b
D. None of These
19. In C++ a function contained within a class is called
A. a member function
B. an operator
C. a class function
D. a method
20. The fields in a class of a C++ program are by default
A. protected
B. public
C. private
D. None of these
21 “C” was primarily developed as a
a. Systems Programing Language
b. General Purpose Language
c. Data Processing Language
d. None of the above
22 “C” is a
a. High Level Language
b. Low Level Language
c. High Level Language with some low level features
d. Low level language with some high level features
23 Most suitable option for “C” literal is:
a. a string
b. a string constant
c. a character
d. an alphabet
24 Length of the string “Correct” is
a. 7
b. 8
c. 6
d. implementation dependent
25 Choose the correct statement
a. An identifier may start with an underscore
b. an identifier may end with an underscore
c. IF is a valid identifier
d. All of the above
26 The “const” feature can be applied to
a. an identifier
b. an array
c. an array argument
d. All of the above
27 Pick the operator that associate from the left
a. +
b. ,
c. <
d. All of the above
28 Choose the correct statement
a. Constant expressions are evaluated at compile time
b. String constants can be concatenated at compile time
c. Size of array must be known at compile time
d. All of the above
29 Pick the operator that associate from the right
a. ?:
b. +=
c. =
d. All of the above
30 Which of the following comments about the “++” operator are correct?
a. It is a unary operator
b. It cannot be applied to an expression.
c. It associates from the right.
d. All of the above
Answers
1 – C / 2 – B / 3 – C / 4 – C / 5 – C / 6 – D / 7 – A / 8 – A / 9 – B / 10 – D
11 – A / 12 – A / 13 – D /1 4 – A / 5 – C / 16 – C / 17 – D /1 8 – A / 19 – A / 20 – C
21 – A /2 2 – C / 23 – B / 24 – A / 25 – D / 26 – D / 27 – D / 28 – D / 29 – D / 30 – D
Tags
C