Sail E0 Webinar
Question
What is the advantage of using 2D jagged array over 2D rectangular array?
Options:
A .  Easy initialization of elements
B .  Allows unlimited elements as well as rows which had '0' or are empty in nature
C .  All of the mentioned
D .  None of the mentioned
Answer: Option B


In many applications where 2 dimensional arrays are used,not all rows need to have all the elements i.e they are sparse.Many rows have 0 elements.In such cases it is better to use 2D jagged arrays as they allow unequal number of elements in each row and also allow for empty
rows.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers