Programming Language Union in C Language Question #2683
Single Choice Not Set

QWhat will be the output of the program in Turbo C (under DOS)?

#include<stdio.h>

int main()
{
    struct emp
    {
        char *n;
        int age;
    };
    struct emp e1 = {"Dravid", 23};
    struct emp e2 = e1;
    strupr(e2.n);
    printf("%s\n", e1.n);
    return 0;
}

ID: #2683 Union in C Language 1,725 views
Question Info
#2683Q ID
Not SetDifficulty
Union in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Error: Invalid structure assignment
  • B DRAVID
  • C Dravid
  • D No output
Correct Answer

Explanation

DRAVID

Share This Question

Challenge a friend or share with your study group.