Home / MCQ Bank / Computer
Computer Classes And Objects In C Plus Plus

What is the purpose of using constructors in C++?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • To initialize the object's data members

Related Computer Questions

What will be the output of the following C code? #include <stdio.h> void main() { int k = 5; int *p = &k; int **m = &p; printf("%d%d%d\n", k, *p, **m); } What is the output of the following code: int x = 10; int *ptr = &x; cout << *ptr << " " << ptr; in C++? Which event is raised when a user clicks on a button in a Windows Forms Application? Which of the following statements is not true about the FORTRAN language? A hand-held device which reads marks or characters on paper by detecting photo-sensitivity is known as