Which of the following Is false about a function to which an array is being pass
ID: 3841219 • Letter: W
Question
Which of the following Is false about a function to which an array is being passed? it always knows the size of the array that is being passed It is being passed the address of the first element in the array. it is able to modify the values stored w the array. The array name is used as an argument m the function call A double subscripted array declared as int a[3][5 J; has how many elements? 8 10 13 15 What value does function something_to_return return when called with a value of 4 for the number? 1 4 8 16 srand: Should be called before each call to rand. Should be used instead of rand to generate truly random numbers Can use the time function's return value as an optimal seed value. Is unnecessary in C++. A function prototype can always be omitted when: A function is defined before it is first invoked A function is invoked before it first defined A function takes no arguments A function does not return a value. What will the following program segment do?Explanation / Answer
9. Answer is (a) It always knows the size of the array that is being passed. This is false because, while passing an array to a function we always pass the address of the first element in the array. The function can receive an array of any size.
10. Answer is (d)15. This is because in a 2-D array the first dimension in general represents number of rows and the second dimension represents the number of columnc (or number of elements in each row). Hence, the number of elements in any 2-D array is equal to the product of numbe rof rows and columns.
11. Answer is (d). Since the value of number is 4 when the function something_to_return is called with 4.
12. Answer is srand();
13. Answer is (a) A function is defined before it is first invoked. i.e., A function prototye can be ommitted when a function is a function is defined before it is first invok
14. Answer is option (c) Print the numbers 1 trough 10.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.