English, asked by avishkarwhalekar, 1 month ago

Question #2
How much memory will be allocated for the following stucture struct book{ int pages; char author[10];float price
A
16 bytes
B
6 bytes
C
20 bytes
10 bytes
D​

Answers

Answered by fahimchachara91
1

Answer:

plz mark me as BRAINLIEST PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ PLZ

Explanation:

Question #2

How much memory will be allocated for the following stucture struct book{ int pages; char author[10];float price

A

16 bytes

B

6 bytes

C

20 bytes

10 bytes

D

Answered by ankhidassarma9
0

Answer:

A.    16 bytes

Explanation:

stucture struct book

{

int pages;

char author[10];

float price;

}

  • the given Structure contains one integer variable, a character array (String) of size ten and a float variable.
  • Size of one integer variable= 2 bytes
  • Size of character array (String) of size ten = 10× 1 byte = 10 bytes
  • Size of a float variable = 4 bytes
  • hence , the size of structure book is (2+10+4)= 16 bytes
Similar questions