What is the effect of the following program segment? int[ ] anArray = new int[50]; int i,
Question:
What is the effect of the following program segment?
int[ ] anArray = new int[50];
int i, j, temp;
string inValue;
for (i = 0; i < 50; ++i)
{
Write("Enter Value");
inValue = ReadLine( );
anArray[i] = int.Parse(inValue);
}
temp = 0;
for (i = 1; i < 50; ++i)
if (anArray[i] < anArray[0])
++temp;
a. arranges the elements of array anArray in ascending order
b. counts the number of elements of array anArray less than its initial element
c. reverses the numbers stored in the array
d. puts the largest value in the last array position
e. none of the above
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
C# Programming From Problem Analysis To Program Design
ISBN: 9781285856872
5th Edition
Authors: Barbara Doyle
Question Posted: