1.

What will be the output of the following C code?
#include <stdio.h>
struct Option
{
int t1;
int t2;
};
void fun(struct Option*);
int main()
{
struct Option opt1[] = {12, 22, 23, 24, 25};
fun(opt1);
}
void fun(struct Option opt[])
{
printf("%d %d n", opt->t1, (opt + 2)->t2);
}

A. 12 0
B. Compilation Error
C. 12 garbage value
D. Nothing
E. undefined behaviour
Answer» B. Compilation Error


Discussion

No Comment Found

Related MCQs