Computer Science, asked by himanshuvagawat1507, 7 months ago

Q11 A dynamic character array has 2 elements. How many bytes of memory is allocated for the array?
Ops: A. 8
B.1
C.4
D. 2​

Answers

Answered by manasimandawade
8

Answer:

D=2

Explanation:

plz follow me please it's very important

Answered by Agastya0606
0

The correct answer is option (d) 2.

  • The dynamic character array has 2 elements as given in the question. Now, 1 character takes 1 byte of memory.
  • Now, while declaring the character array,  we have to specify its size as smaller than the size of the input string, then we will get an error because the space in the memory allocated to the array is lesser than the size of the input string.
  • So, 2 bytes of memory will be allocated to the dynamic character array having 2 elements.

#SPJ2

Similar questions