Cpp Programming Quiz 46 – Which of the following statement is correct?
[B]. Object is an instance of a class.
[C]. Class is an instance of data type.
[D]. Object is an instance of data type.
Answer: Option B
[C]. Class is an instance of data type.
[D]. Object is an instance of data type.
Answer: Option B
Answer: Option D
A constructor has a different name than the class in which it is present.
[C].
A constructor always returns an integer.
[D].
A constructor cannot be overloaded.
Answer: Option A
Explanation:
No answer description available for this question.
#include
struct Bix
{
short n;
};
int main()
{
Bix b;
Bix& rb = b;
b.n = 5;
cout << b.n << " " << rb.n << " ";
rb.n = 8;
cout << b.n << " " << rb.n;
return 0;
}
[A].It will result in a compile time error.
[B].The program will print the output 5 5 5 8.
[C].The program will print the output 5 5 8 8.
[D].The program will print the output 5 5 5 5.
Answer: Option C
Answer: Option C
[B].
[C].
[D].
Answer: Option C
Explanation:
The statement ‘C’ is correct. When we pass an array as a funtion argument, the base address of the array will be passed.
Answer: Option D