≡ Menu

Determine how may bytes are needed to store a structure of type hair_info_t, assuming two bytes for an integer and one byte for a character

You are Here: Home > Computer Subjects > Programming in C Language > …

Determine how may bytes are needed to store a structure of type hair_info_t, assuming two bytes for an integer and one byte for a character.

Ans. Suppose the structure looks like:

     struct hair_info_t
     {
         int a;
         int b;
         char c;
     }

Then two Integer will take 2 + 2 = 4 byte of memory and the Character will take 1 byte of Memory. So, the total memory require is: 2 + 2 + 1 = 5 byte.

 

Click Here to Find Latest Jobs and Current Affairs

{ 0 comments… add one }

Leave a Comment