Computer Science, asked by yaariya44, 11 months ago

what is an array in c​

Answers

Answered by Anonymous
3

!! RAM RAM !!

ANSWER ==

C - Arrays

Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.

hope it helps uH

#Hopēless_ Romantic

Answered by Anonymous
6

Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type. A specific element in an array is accessed by an index.

It means you are assigning an array to data[10] which can hold just an element. If you want to initialize an array, try using Array Initializer: int[] data = {10,20,30,40,50,60,71,80,90,91}; // or int[] data; data = new int[] {10,20,30,40,50,60,71,80,90,91}; Notice the difference between the two declarations.

Similar questions