Cpp Programming Quiz 23 – Which of the following statement is correct about the program given below?

Question: Which of the following statement is correct about the program given below?

#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 A

Cpp Programming Quiz 24 – Which of the following statement is correct about the program given below?

Question: Which of the following statement is correct about the program given below?

#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

Cpp Programming Quiz 25 – Which of the following statement is correct about the program given below?

Question: Which of the following statement is correct about the program given below?

#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

Cpp Programming Quiz 26 – Which of the following statements is correct?

Question: Which of the following statements is correct?
  1. Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
  2. A reference is not a constant pointer.

[A].Only 1 is correct.
[B].Only 2 is correct.[C].Both 1 and 2 are correct.
[D].Both 1 and 2 are incorrect.

Answer: Option D

Cpp Programming Quiz 27 – Which of the following statements is correct?

Question: Which of the following statements is correct?
  1. An array of references is acceptable.
  2. We can also create a reference to a reference.

[A].
Only 1 is correct.
[B].Only 2 is correct.
[C].

Both 1 and 2 are correct.
[D].

Both 1 and 2 are incorrect.

Answer: Option D

Explanation:

No answer description available for this question.