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

▼ Show 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.

Learn More with Madanswer

Related questions

0 votes
asked Jan 24 in JAVA by rajeshsharma