C++ Programming - References - Discussion

Discussion Forum : References - Programs (Q.No. 5)
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; 
}
It will result in a compile time error.
The program will print the output 1.
The program will print the output 2.
The program will print the output 3.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
15 comments Page 2 of 2.

Anonymous said:   1 decade ago
Why the value of x, y, z is 3?

Vicky said:   1 decade ago
What is the use of enum ?

Zubair Bhatti said:   1 decade ago
Why we use enum?

Mrunali said:   8 years ago
How x,y,z is 2?

Chanchal said:   7 years ago
Thank you @Raj.


Post your comments here:

Your comments will be displayed after verification.