1.

What is two-dimensional array? Write its syntax and example.

Answer»

Two dimensional array is a collection of elements of similar type that share a common name, structured in two dimensions. Each element is accessed by two index values.

Syntax:

<data-type> <array-name> [<sizel>] [<size2>];

Example:

int marks[5][5];



Discussion

No Comment Found

Related InterviewSolutions