Struct out {struct in{ char c;int d;}s1,*p1;}a1, *pa1;pa1 = &a1;a1.p1 = &s1;Which is incorrect?a. a1.p1->c b. pa1->p1->c c. a1->p1 d. a1.s1.c

This question is related to TCS Interview

Showing Answers 1 - 7 of 7 Answers

Guest

  • Sep 26th, 2006
 

option c is wrong i.e. a1->p1. Because a1 is not a pointer, you can not refer its member through -> operator.

naresh

  • Feb 22nd, 2007
 

hi frns
the above one ans is c
because a1 can hold only the value of s1 but not its address value........
abd more over p1 cant be hold by a1 so the a1 cant become pointer to p1

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions