Examveda

What is the output of this program?
#include<stdio.h>
#include<stdlib.h>
struct st{
    int a;
    char b;
};
 
int main()
{
    struct st *st_ptr;
    st_ptr = malloc(sizeof(struct st));
    printf("%d\n",sizeof(struct st));
    return 0;
}

A. 8

B. 5

C. 0

D. none of the mentioned

Answer: Option A


This Question Belongs to Computer Science >> Linux

Join The Discussion

Related Questions on Linux