C
Programming and Technical
Programming
Program
What will be the output of the program?
#include
int main()
{
int y=128;
const int x=y;
printf("%dn", x);
return 0;
}
Options
1) 128
2) Garbage value
3) Error
4) 0
Read Solution (Total 6)
-
- 128n will be displayed
- 8 years agoHelpfull: Yes(1) No(0)
- Compiler Error!
- 8 years agoHelpfull: Yes(0) No(1)
- 128n will be the answer
- 8 years agoHelpfull: Yes(0) No(0)
- garbage value
- 8 years agoHelpfull: Yes(0) No(0)
- output=128
- 8 years agoHelpfull: Yes(0) No(0)
- 1) 128
value of const x in not changing here
x just having a reference of y's value - 8 years agoHelpfull: Yes(0) No(0)
C Other Question