MCQ of C/C++ Programming Language – Set 5

5.1  By default, members of a C++ class are:
a.  Private
b.  Public
c.  Protected
d.  None of the above

5.2  Which of the following statements is true in C++?
a.  A struct cannot have member functions.
b.  A struct cannot have private members.     
c.  The default access modifier of struct is public.
d.  None of the above.

5.3  C++ supports:
a.  Multiple inheritance
b.  Pointer to functions
c.  Recursion
d.  All of the above

5.4  Which of the following is not a C++ keyword?
a.  Extern
b.  Auto
c.  Inherits
d.  None of the above

5.5  Which of the following is not a bitwise operator?
a.  &&
b.  <<
c.  ~
d.  ^

5.6  In C++, the expression 5/2 is evaluated to:
a.  2.5
b.  2
c.  3
d.  None of the above

5.7  In C++, the string literal “C++

Leave a Reply

error: Content is protected !!