1.

What will be the output of the following C code?
#include <stdio.h>
struct price
{
int s1;
char s2;
};
typedef struct price* ptr*;
int main()
{
struct price pr[] = {15, 52, 35, 95, 55, 56};
ptr ptr1 = pr;
printf("%d n", ptr1->s1);
}

A. Compilation Error
B. Garbage value
C. Segmentation fault
D. Undefined behaviour
E. None of these
Answer» B. Garbage value


Discussion

No Comment Found

Related MCQs