A
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;
}
{
struct car
{
int km;
}*p1[2];
struct car c1={1234};
p1[0]=&c1;
printf("%d ",p1[0]->km);
return 0;
}
- Correct Answer - Option(C)
- Views: 22
- Filed under category C Programming
- Hashtags:
Discusssion
Login to discuss.