A

Admin • 833K Points
Coach

Q. What is the output of C program with structures pointers?

Code:
int main()
{
struct forest
{
int trees;
int animals;
}F1,*F2;
F1.trees=1000;
F1.animals=20;
F2=&F1;
printf("%d ",F2.animals);
return 0;
}
  • (A) 0
  • (B) 20
  • (C) Compiler error
  • (D) None of the above
  • Correct Answer - Option(C)
  • Views: 19
  • Filed under category C Programming
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.