References - Programs Multiple Questions and Answers.
Exercise Questions ::
References
1. | Which of the following statement is correct about the program given below? |
|
#include<iostream.h>
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. |
|
|
Published by:Michael Daani
2. | Which of the following statement is correct about the program given below? |
|
#include<iostream.h>
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. |
|
|
Published by:Michael Daani
3. | Which of the following statement is correct about the program given below? |
|
#include<iostream.h>
int main()
{
int x = 10;
int &y = x;
x++;
cout<< x << " " << y++;
return 0;
}
|
| A. | The program will print the output 11 12. |
| B. | The program will print the output 12 11. |
| C. | The program will print the output 12 13. |
| D. | It will result in a compile time error. |
|
|
Published by:Michael Daani
4. | Which of the following statement is correct about the program given below? |
|
#include<iostream.h>
int main()
{
int x = 10;
int &y = x;
x = 25;
y = 50;
cout<< x << " " << --y;
return 0;
}
|
| A. | The program will print the output 25 49. |
| B. | It will result in a compile time error. |
| C. | The program will print the output 50 50. |
| D. | The program will print the output 49 49. |
|
|
Published by:Michael Daani
5. | Which of the following statement is correct about the program given below? |
|
#include<iostream.h>
enum bix
{
a=1, b, c
};
int main()
{
int x = c;
int &y = x;
int &z = x;
y = b;
cout<< z--;
return 0;
}
|
| A. | It will result in a compile time error. |
| B. | The program will print the output 1. |
| C. | The program will print the output 2. |
| D. | The program will print the output 3. |
|
|
Published by:Michael Daani