Home » C Programming » Constants » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int const m = 10;
    m++;
    printf("m is %d", m);
    }
    1. 10
    2. 11
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: D

Constant variable has to be declared and defined at the same time. Trying to change it results in an error.



Your comments will be displayed only after manual approval.