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

Join The Discussion