Home » C Programming » Operators » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int s1 = 5; //, s2 = 9;
    const int *ptr = &s1;
    *ptr++;
    printf("%d\n", *ptr);
    }
    1. 9
    2. 5
    3. Garbage value
    4. Compilation Error
    5. Increment of read-only location compile error
Correct Option: C

Garbage value 1989385672



Your comments will be displayed only after manual approval.