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

QWhat will be the output of the program?

#include<stdio.h>

    struct course
    {
        int courseno;
        char coursename[25];
    };
int main()
{
    struct course c[] = { {102, "Java"}, 
                          {103, "PHP"}, 
                          {104, "DotNet"}     };

    printf("%d ", c[1].courseno);
    printf("%s\n", (*(c+2)).coursename);
    return 0;
}

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

Choose the Best Option

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

  • A 103 DotNet
  • B 102 Java
  • C 103 PHP
  • D 104 DotNet
Correct Answer

Explanation

103 DotNet

Share This Question

Challenge a friend or share with your study group.