C++ Programming Question and Answers

51. What is public, private and protected?
  Public, Protected and Private are three access specifier in C++.
  • Public data members and member functions are accessible outside the class.
  • Protected data members and member functions are only available to derived classes.
  • Private data members and member functions can't be accessed outside the class.
 
Your Name Your Email-ID
Your Answer
52. Who developed C++ language?
  C++ was developed at AT&T Bell laboratories in the early 1980s by Bajarne Stroustrup.
 
Your Name Your Email-ID
Your Answer
53. List a few of the keywords in C++?
 
  • auto,
  • break
  • case
  • const
  • class
  • default
  • static
  • switch
  • sizeof
  • while
  • if etc.
 
Your Name Your Email-ID
Your Answer
54. What is the classification of tokens?
  Tokens are classified as keywords, identifiers, constants, operators and punctuators.
 
Your Name Your Email-ID
Your Answer
55. What are the four storage specifiers in C++?
  There are four storage specifiers in C++:
  • Auto
  • Static
  • Register and
  • Extern
 
Your Name Your Email-ID
Your Answer
123456789101112


131415 Page 11 of 15