Examveda

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

A. Run time error

B. Nothing

C. hello

D. Varies

Answer: Option C


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union