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

L W



Your comments will be displayed only after manual approval.