How can an array be declared and initialized?
Answers
Answered by
1
declared a[10];
initialised a[ ]={1,2,3,4,5,6};
Answered by
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
Math,
7 months ago
Social Sciences,
7 months ago
English,
7 months ago
English,
1 year ago
Art,
1 year ago