Home » C Programming » Operators » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int n = 5;
    int *ptr = &n;
    int *q = ptr++;
    int r = ptr - q;
    printf("%d", r);
    }
    1. Compilation Error
    2. 5
    3. 1
    4. Runtime Error
    5. None of these
Correct Option: C

1



Your comments will be displayed only after manual approval.