Examveda

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

A. Nothing

B. Compile time error

C. hey

D. Varies

Answer: Option B


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union