Tuesday 26 March 2013

Is the following code legal?


    Is the following code legal?
struct a
    {
int x;
 struct a b;
    }
Answer:
         No
Explanation:
Is it not legal for a structure to contain a member that is of the same
type as in this case. Because this will cause the structure declaration to be recursive without end.

Blog Author: Vijay Kumar

No comments:

Post a Comment