Computer Science, asked by yashika3999, 11 months ago

Hola friends .....❤❤

what you mean by array ? explain in detail with example ​

Answers

Answered by rishit015
1

An array is a data structure that contains a group of elements. Typically these elements are all of the same data type, such as an integer or string. Arrays are commonly used in computer programs to organize data so that a related set of values can be easily sorted or searched.

For example, a search engine may use an array to store Web pages found in a search performed by the user. When displaying the results, the program will output one element of the array at a time. This may be done for a specified number of values or until all the values stored in the array have been output. While the program could create a new variable for each result found, storing the results in an array is much more efficient way to manage memory.

The syntax for storing and displaying the values in an array typically looks something like this:

arrayname[0] = "This ";

arrayname[1] = "is ";

arrayname[2] = "pretty simple.";

print arrayname[0];

print arrayname[1];

print arrayname[2];

The above commands would print the first three values of the array, or "This is pretty simple." By using a "while" or "for" loop, the programmer can tell the program to output each value in the array until the last value has been reached. So not only do arrays help manage memory more efficiently, they make the programmer's job more efficient as well.

Answered by malti010872
0

\huge{\bold{Question:}}

What is array in C with example?

\huge{\bold{Answer:}}

An array is a collection of a fixed number of values of a single type. For example: if you want to store 100 integers in sequence, you can create an array for it. int data[100]; The size and type of arrays cannot be changed after its declaration.

Hope it works!!!

Mark as brainliest plzzz...

Similar questions