Computer Science, asked by ucchimanshup2613, 1 year ago

How can an array be declared and initialized?

Answers

Answered by abhishekbhandari0611
1

declared a[10];

initialised a[ ]={1,2,3,4,5,6};

Answered by aqibkincsem
2

An array is a type of data that holds value that's moreover fixed for same type of objects. Now, arrays are usually multi-dimensional arrays, or one-dimensional arrays.

To declare an array of 10 floating point values, we need to write in this format: float mark [10]; Therefore, datatype - name of array -[ size of array];  To initialize an array, int mark[] = {39, 40, 18, 7, 3};

Similar questions