Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    char *str= "WATCH";
    char *ptr = str;
    printf("%c %c", 1[ptr], str[1]);
    }
    1. A A
    2. WATCH
    3. Compilation Error
    4. Garbage value
    5. None of these
Correct Option: A

A A



Your comments will be displayed only after manual approval.