Examveda

What will be the output of the following C code?
#include <stdio.h>
struct temp
{
    int a;
} s;
void func(struct temp s)
{
    s.a = 10;
    printf("%d\t", s.a);
}
main()
{
    func(s);
    printf("%d\t", s.a);
}

A. 10 (Garbage Value)

B. 0 10

C. 10 0

D. (Garbage Value) 10

Answer: Option C


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union