Q: What is the output of this C code?
Options:
a) h
b) i
c) e
d) y
Answer: B
| #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