C++ Interview Question and Answers

46. Name some pure object oriented languages?
 
  • Smalltalk
  • Java
  • Eiffel
  • Sather
 
Your Name Your Email-ID
Your Answer
47. What is encapsulation?
  Encapsulation (or information hiding) is the process of combining data and functions into a single unit called class.
 
Your Name Your Email-ID
Your Answer
48. What is problem with Runtime type identification?
  The run time type identification comes at a cost of performance penalty. Compiler maintains the class.
 
Your Name Your Email-ID
Your Answer
49. What are the differences between new and malloc?
 
  • New initializes the allocated memory by calling the constructor. Memory allocated with new should be released with delete.
  • Malloc allocates uninitialized memory.
  • The allocated memory has to be released with free.new automatically calls the constructor while malloc(dosen’t)
 
Your Name Your Email-ID
Your Answer
50. What is conversion operator?
  You can define a member function of a class, called a conversion function, that converts from the type of its class to another specified type.
 
Your Name Your Email-ID
Your Answer