Home » C Programming » Variables » Question
  1. Will the following C code compile without any error?
    #include <stdio.h>
    int main()
    {
    for (int n = 0; n < 5; n++);
    return 0;
    }
    1. No
    2. Yes
    3. Garbage value
    4. Depends on the C standard implemented by compilers
    5. None of these
Correct Option: D

Compilers implementing C90 do not allow this, but compilers implementing C99 allow it.



Your comments will be displayed only after manual approval.