What will be printed out as a result of the following code's execution?
int x;
while(x < 100) {
    cout << x << " ";
    x++;
}
Explanation
C++ does not initialize POD (Plain Old Data) variables defined on the stack. Variable x that is located on the stack can take an arbitrary value, since it was not initialized during its definition. Therefore, the loop can be executed any number of times.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты