in C Plus Plus by
Which type of memory is used by an Array in C++ programming language?

a) Contiguous

b) None-contiguous

c) Both A and B

d) Not mentioned

1 Answer

0 votes

a) Contiguous

In the C and C++ programming language, the memory used by an array is usually contiguous, which means when an array is declared or initialized in the program a block of memory is selected form the memory space immediately. The major drawback of an array is that users have to guess the size of the array before actually using it, in which a significant amount of memory will be occupied even when it is not used. This later creates the problem of lack of memory.

Related questions

0 votes
asked Jan 24, 2021 in JAVA by rajeshsharma
+2 votes
asked Jun 19, 2019 in C Plus Plus by johncina
0 votes
asked Jun 11, 2020 in C Plus Plus by Robindeniel