A
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;
}
{
struct forest
{
int trees;
int animals;
}F1,*F2;
F1.trees=1000;
F1.animals=20;
F2=&F1;
printf("%d ",F2.animals);
return 0;
}
- Correct Answer - Option(C)
- Views: 19
- Filed under category C Programming
- Hashtags:
Discusssion
Login to discuss.