Ask your own question, for FREE!
Computer Science 14 Online
OpenStudy (anonymous):

how are arrays processed? Explain with an example

OpenStudy (anonymous):

for(i=0;i<10;i++) { cin>>a[i]; } this loop inserts 0-10 elemnts in array 'a'; Actually i think this is what u menat proccesed:>

OpenStudy (anonymous):

no, it storing elements from 0 to 9... its actual count is 10... Array - A set of numbers that will follow a specific pattern. An orderly arrangement often in rows, columns or a matrix.

OpenStudy (anonymous):

An example of a one-dimensional array would be a list. A simple list stating information in a structured way that is in a particular order would be considered a one-dimensional array. Arrays are often used in computer programming and in mathematics. These are subjects that require complex digits to be structured in such a way that they are easily understood and recognized. They would otherwise be meaningless or difficult to understand. // Program arrays.cpp manipulates values in an array. #include <iostream> using namespace std; int main () { const int MAX_ARRAY = 5; int numbers[MAX_ARRAY]; int index; int sum; // Stored values in the array. for (index = 0; index < MAX_ARRAY; index++) numbers[index] = index * index; // The values in the array are summed. sum = 0; for (index = 0; index < MAX_ARRAY; index++) sum = sum + numbers[index]; cout << "Sum is " << sum << endl; // Add code to print out the values of all the array elements return 0; }

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!