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

Segmentation fault



Your comments will be displayed only after manual approval.