Q:

Following declaration of an array of struct, assumes size of byte, short, int and long are 1, 2, 3 and 4 respectively. Alignment rule stipulates that n-byte field must be located at an address divisible by n. The fields in a struct are not rearranged, padding is used to ensure alignment. All elements of array should be of same size.

Struct complx Short s Byte b Long l Int iEnd complxComplx C[10] 

Assuming C is located at an address divisible by 8, what is the total size of C, in Bytes ?
(A) 150
(B) 160
(C) 200
(D) 240

ISRO

All Replies

Viewing 1 replies (of 1 total)

Viewing 1 replies (of 1 total)

  • You must be logged in to reply to this topic.