A

Admin • 833K Points
Coach

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

Code:
int main()
{
struct car
{
int km;
}*p1[2];
struct car c1={1234};
p1[0]=&c1;
printf("%d ",p1[0]->km);
return 0;
}
  • (A) 0
  • (B) 1
  • (C) 1234
  • (D) Compiler error
  • Correct Answer - Option(C)
  • Views: 22
  • 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.