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
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
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
Chemistry,
17 days ago
Psychology,
17 days ago
Math,
1 month ago
Math,
1 month ago
Math,
8 months ago
Environmental Sciences,
8 months ago
English,
8 months ago