

MCQOPTIONS
Saved Bookmarks
1. |
What will be the output of the following C code?#include <stdio.h> struct M { char *name; struct M *next; }; struct M *ptrary[10]; int main() { struct M m1, m2; m1.name = "xyz"; m1.next = NULL; ptrary[0] = &m1; strcpy(m2.name, m1.name); ptrary[1] = &m1; printf("%s n", ptrary[1]->name); return 0; } |
A. | Compilation Error |
B. | Garbage value |
C. | Prayag |
D. | Segmentation fault |
E. | None of these |
Answer» E. None of these | |