-- advertisement --

Discussion

  1. What will be the output of the following program:-
     #include int main() { const int a=34; int b=128; a = b; printf("%d\n",a); return 0; } 
    1. 128
    2. 34
    3. Compiler error
    4. garbage value
  1. Correct Option: C

    Compiler marks a as read only, any attemp to modify the value will generate compiler error.

-- advertisement --

-- advertisement --