Question #261861

How to declare array in c? Briefly explain the different types of array with simple example.

Expert's answer

1. Array in c is declared using the following syntax:

data_type array_name [array_size];

For example

int marks[10];


2..There are two types of array in c:

a. Single dimensional array:

For example

string names[3];

b. Multidimentional array:

For example

double prices[5][8];

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS