aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C++ Object Oriented Programming
  • Name a function in C++ which provides initial values to t...
Multiple choice

Name a function in C++ which provides initial values to the objects.

  1. Member function

  2. Friend function

  3. Constructor

  4. Destructor

  5. None of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

A constructor is a member function whose task is to initialise the values for objects as they are created.

Keep practicing — related questions

  • Which of the following functions is used in C++ for the automatic initialization of class objects?
  • Which of the following objects in C++ does not take any arguments?
  • __________ is an unique member function, whose task is to initialize the objects of its class.
  • Which of the following functions initalizes the variables contained in a class:
  • In C++, what are the names given to the functions which are not actually called rather their codes are subs...
  • Which of the following types of constructor is used to initialize all objects of the same class to the same...
  • Which of the following is a special member function that is automatically called whenever an object of the ...
  • Which of the following functions is created by the compiler when no constructor is created or supplied by t...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Object-Oriented Programming (2239 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy