Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    char **ptr = {"Welcome", "to", "Interview Mania"};
    printf("%s", (ptr)[0]);
    return 0;
    }
    1. Welcome to Interview Mania
    2. Garbage value
    3. Compilation Error
    4. Segmentation fault
    5. None of these
Correct Option: D

Segmentation fault



Your comments will be displayed only after manual approval.