MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the following C code?#include <stdio.h> struct student { char *name; }; void main() { struct student s1[2], s2[2]; s1[1] = s1[0] = "Ajit Kumar Gupta"; printf("%s %s", s1[0].name, s1[1].name); } |
| A. | Compilation Error |
| B. | Garbage value |
| C. | Ajit Kumar Gupta |
| D. | Undefined behaviour |
| E. | None of these |
| Answer» B. Garbage value | |