koenig-logo

Click on to view the answer

Which of the following is not a stream class in C++?

Answer :
  • stringstream
Suggested Course : C++

What is the purpose of a typedef in C++?

Answer :
  • To create an alias for a data type
Suggested Course : C++

What typically causes an exception in C++?

Answer :
  • A faulty statement in a try block that operates on objects of a class
Suggested Course : C++

What is the difference between a class and an object in C++?

Answer :
  • A class is a blueprint for creating objects, while an object is an instance of a class.
Suggested Course : C++

What is the purpose of the this pointer in C++?

Answer :
  • To refer to the current object in a member function.
Suggested Course : C++

What is the purpose of the typeid operator in C++?

Answer :
  • To return the type of an object at runtime.
Suggested Course : C++

Which of the following is not a valid C++ identifier?

Answer :
  • b) 123variable
Suggested Course : C++

What is the purpose of the "friend " keyword in C++ class?

Answer :
  • To grant non-member functions or classes access to private and protected members of a class
Suggested Course : C++