Quantcast
Channel: MCQ Questions » C/C++ Programming Language (MCQs)
Viewing all articles
Browse latest Browse all 9

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

$
0
0

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++” occupies exactly ………. of memory.
a.  3 bytes
b.  4 bytes
c.  5 bytes
d.  6 bytes

5.8  In C++, generic functions are created using the keyword:
a.  Generic
b.  Template
c.  Class
d.  Type

5.9  The implicit argument passed to a member function of a c++ class is called:
a.  “implicit” pointer
b.  “sender” object
c.  “this” pointer
d.  “me” object

5.10  The default copy constructor performs:
a.  Deep copy
b.  Shallow copy
c.  Hard copy
d.  Soft copy

 


 
Click Here for Answers

1 – A / 2 – C / 3 – D / 4 – C / 5 – A / 6 – B / 7 – B / 8 – B / 9 – C / 10 – B

Incoming search terms:

  • in c the expression 5/2 is evaluated to
  • multiple choice questions on inheritance in c
  • in c 5/2 is evaluated to
  • objective questions on inheritance in c
  • mcq on inheritance in c
  • which of the following is not a keyword in c
  • mcq on pointers in c
  • difficult c multiple choice questions with answers
  • inheritance in c multiple choice questions
  • mcqs on inheritance in c

Related posts:

  1. MCQ of Microsoft Word – Set 6
  2. MCQ of C/C++ Programming Language – Set 1
  3. MCQ of C/C++ Programming Language – Set 2

Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>