Examveda

What will be the output of the following C code?
#include <stdio.h>
struct student
{
    char *c;
};
void main()
{
    struct student *s;
    s->c = "hello";
    printf("%s", s->c);
}

A. hello

B. Segmentation fault

C. Run time error

D. Nothing

Answer: Option B


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union