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

1



Your comments will be displayed only after manual approval.