Which of the following lines contain errors?
int main() {
    #define MyConst 1
    int k = MyConst + 1; //1
    #undef MyConst       //2
    k += MyConst;        //3
    #define MyConst 2    //4
    k = MyConst++;       //5
    return 0; 
}
Explanation
Line 3 - MyConst is undefined here. Definition was abolished in Line 2.
Line 5 - value of a constant cannot be changed.

Следи за CodeGalaxy

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

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