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

QWhat will be the output of the program in 16-bit platform (under DOS)?

#include<stdio.h>

int main()
{
    struct node
    {
        int data;
        struct node *link;
    };
    struct node *p, *q;
    p = (struct node *) malloc(sizeof(struct node));
    q = (struct node *) malloc(sizeof(struct node));
    printf("%d, %d\n", sizeof(p), sizeof(q));
    return 0;
}

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

Choose the Best Option

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

  • A 2, 2
  • B 8, 8
  • C 5, 5
  • D 4, 4
Correct Answer

Explanation

2, 2

Share This Question

Challenge a friend or share with your study group.