A short integer occupies 2 bytes an, ordinary integer 4 bytes and a long integer occupies 8 bytes of memory
If a structure is defined as
struct TAB{
short a;
int b;
long c;
}TABLE[10];
the the total memory requirement for TABLE is
A. | 14 |
B. | 140 |
C. | 40 |
D. | 32 |
Answer : B Explanation : sonali manohar shelke said: (8:56am on Monday 18th December 2017)
a is short which occupies 2 bytes per element so there are 10 elements which equal to 20 bytes for ab is int which contains 4 bytes per element so again they alson contain 10 elements which is equal to 40 bytesand c is long which occupies 80 bytes for 10 elements' 80 total memory space occupied is 20 40 80=140so option B is correct
|
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |