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

I I



Your comments will be displayed only after manual approval.