What will be the output of the following C++ code?
#include<iostream>
using namespace std;
int x[100];
int main()
{
cout << x[99] << endl;
}
#include<iostream>
using namespace std;
int x[100];
int main()
{
cout << x[99] << endl;
}A. Garbage value
B. 0
C. 99
D. Error
Answer: Option B
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