Home » C Programming » Storage Classes » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    char *ptr = calloc(200, 2);
    ptr = "Interview Mania";
    printf("%s\n", ptr);
    }
    1. Interview Mania
    2. Compilation Error
    3. Garbage
    4. Segmentation fault
    5. None of these
Correct Option: A

Interview Mania



Your comments will be displayed only after manual approval.