• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

ISRO | ISRO CS 2020 | Question 12

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 complex
  Short s
  Byte b
  Long l
  Int i
End complex
Complex 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

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments