+ 1

Suppose we declared an array 'a[20];' and and we are using only 'a[10]' then what happen of the remaining space,is it wasted.?

24th Dec 2016, 12:26 PM
Rajendra Boke
Rajendra Boke - avatar
2 Answers
+ 3
Yes... This is the principle of static array, when dynamic ones get memory space when it's required ( but could result to memory fragmentation, wether static array store all his values in once contiguous memory range ).
24th Dec 2016, 12:32 PM
visph
visph - avatar
+ 1
thnxx
24th Dec 2016, 2:46 PM
Rajendra Boke
Rajendra Boke - avatar
Hot today
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
help
0 Votes
AI
2 Votes
APIs
1 Votes