1.

What will be the output of the following C code?
#include <stdio.h>
struct Employee
{
char *name;
};
struct Employee emp[2];
void main()
{
emp[0].name = "Ajit";
emp[1] = emp[0];
printf("%s %s", emp[0].name, emp[1].name);
emp[1].name = "Sujit";
printf(" %s %s", emp[0].name, emp[1].name);
}

A. Ajit Ajit Ajit Sujit
B. Sujit Ajit Ajit Ajit
C. Sujit Ajit
D. Compilation Error
E. None of these
Answer» B. Sujit Ajit Ajit Ajit


Discussion

No Comment Found

Related MCQs