Examveda

What will be the output of the following C code?
#include <stdio.h>
void main()
{
    char *p = calloc(100, 1);
    p = "welcome";
    printf("%s\n", p);
}

A. Segmentation fault

B. Garbage

C. Error

D. welcome

Answer: Option D


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output