

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