Single Choice Not Set

QWhat 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);
    }

ID: #2634 Structure in C Language 3,484 views
Question Info
#2634Q ID
Not SetDifficulty
Structure in C LanguageTopic

Choose the Best Option

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

  • A 10 (Garbage Value)
  • B 0 10
  • C 10 0
  • D (Garbage Value) 10
Correct Answer

Explanation

10 0

Share This Question

Challenge a friend or share with your study group.