SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Walter Savitch ,julia Lobur
Chapter:
Arrays
Exercise:
Self-test Exercises
Question:14 | ISBN:9780321531346 | Edition: 7

Question

Consider the following function definition:

void too2(int a[], int how_many)

{

for (int index = 0; index < how_many; index++)

a[index] = 2;

}

Which of the following are acceptable function calls?

int my_array[29];

too2(my_array, 29);

too2(my_array, 10);

too2(my_array, 55);

Hey too2. Please, come over here.”

int your_array[100];

too2(your_array, 100);

too2(my_array[3], 29);

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

The following are acceptable function calls:

a) too2(my_array, 29);            
b) too2(my_array, 10);
e) too2(your_array, 100);       
0 0

Discussions

Post the discussion to improve the above solution.