Wednesday, 10 December 2014

Programming Quiz-4

Q: What is the output of this C code?

#include <stdio.h>

struct student

{

    char a[5];

};

void main()

{

    struct student s[] = {"hi", "hey"};

    printf("%c", s[0].a[1]);

}

 Options:

a) h
b) i
c) e
d) y

Answer: B

No comments:

Post a Comment