|
C Programming Reference >> C Programming Reference Question Bank >> 19/07/07 - 510 Views - No Ratings Yet Level - Begineer Question - What will be the output of the following code and why?
Answer - Ans : 3 Explanation - In a structure, all its elements are allocated storage in declaration order. So when the pointer to structure is type casted into a pointer of type of first element of declaration and its value is displayed then value shown will be the value of that first variable. So value of a ie. 3 will be displayed in output of the c code snippet above. Reader Comments -
|
|||