What will be the output of the following C++ code?
#include <stdio.h>
int main()
{
const int x;
x = 10;
printf("%d", x);
return 0;
}
#include <stdio.h>
int main()
{
const int x;
x = 10;
printf("%d", x);
return 0;
}A. 10
B. Garbage value
C. Error
D. Segmentation fault
Answer: Option C
Related Questions on Introduction to C plus plus
What does the 'cin' object in C++ represent?
A. File output stream
B. File input stream
C. Standard output stream
D. Standard input stream

Join The Discussion