A

Admin • 833K Points
Coach

Q. What is the output of this code?

Code:
struct s {
int a;
char b;
};
int main() {
struct s x = {5, 'A'};
printf("%d %c", x.a, x.b);
}
  • (A) 5 A
  • (B) A 5
  • (C) Error
  • (D) Undefined
  • Correct Answer - Option(A)
  • Views: 19
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

Correct member values are printed using structure access.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.