



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This quiz was taken by Prof. Mala Narasinha in class Computer Programming course at B R Ambedkar National Institute of Technology. It includes: Console, Index, Function, Array, Sample, Input, Output, Alphabetical, Order, Size, Sort
Typology: Exercises
1 / 5
This page cannot be seen from the preview
Don't miss anything!




int myArray[4][4], index1, index2;
for (index1 = 0; index1 < 4; index1++) for (index2 = 0; index2 < 4; index2++) myArray[index1][index2] = index2; for (index1 = 0; index1 < 4; index1++) { for (index2 = 0; index2 < 4; index2++) cout << myArray[index1][index2] << " "; cout << endl; }
B: Consider the following function definition:
void too2(int a[], int howMany) { for (int index = 0; index < howMany; index++) a[index] = 2; } Which of the following are acceptable function calls?
too2(myArray, 29); too2(myArray, 10); too2(myArray, 55); “Hey too2. Please come over here.”
too2(yourArray, 100); too2(myArray[3], 29);
Sample Input Sample Output 1 2 3 9 8 7 4 5 6 6 5 4 7 8 9 3 2 1