Cpp Programming 74 – What is correct about the static data member of a class?
[B]. A static data member is shared among all the object of the class.[C]. A static data member can be accessed directly from main().
[D]. Both A and B.
Answer: Option D
Answer: Option D
Object constructor
[C].
Dynamic constructor
[D].
Copy constructor
Answer: Option D
Explanation:
No answer description available for this question.
#include
int main()
{
int x = 80;
int y& = x;
x++;
cout << x << " " << --y;
return 0;
}
[A].The program will print the output 80 80.
[B].The program will print the output 81 80.
[C].The program will print the output 81 81.
[D].It will result in a compile time error.
Answer: Option D
Answer: Option D
A destructor has integer return type.
[C].
A destructor has no return type.
[D].
A destructors return type is always same as that of main().
Answer: Option C
Explanation:
No answer description available for this question.
Constructor is called either implicitly or explicitly, whereas destructor is always called implicitly.
[C].
Destructor is always called explicitly.
[D].
Constructor and destructor functions are not called at all as they are always inline.
Answer: Option B
Explanation:
No answer description available for this question.
[B].
[C].
[D].
Answer: Option D
Explanation:
No answer description available for this question.