C++ | Misc C++ | Question 7
#include<iostream> using namespace std; int x[100]; int main() { cout << x[99] << endl; } |
chevron_right
filter_none
This question is contributed by Sudheendra Baliga
(A) Unpredictable
(B) Runtime error
(C) 0
(D) 99
Answer: (C)
Explanation: The correct answer is c. In C++ all the uninitialized global variables are initialized to 0.
Quiz of this Question
Recommended Posts:
- C | Misc | Question 7
- C | Misc | Question 6
- C | Misc | Question 7
- C++ | Misc C++ | Question 6
- C | Misc | Question 5
- C++ | Misc C++ | Question 8
- C++ | Misc C++ | Question 1
- C | Misc | Question 8
- C++ | Misc C++ | Question 2
- C++ | Misc C++ | Question 7
- C++ | Misc C++ | Question 5
- C | Misc | Question 2
- C | Misc | Question 1
- C | Misc | Question 9
- C++ | Misc C++ | Question 3



