Examveda

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

A. Compile time error

B. Varies

C. hi

D. h

Answer: Option A


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union