Answer to Question #261861 in C for Amraj

Question #261861

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

1
Expert's answer
2021-11-07T10:12:12-0500

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS