Cs 122 Lab Questions Set 1: PRACTICE. Inside The PRACTICE Folder, Create Another Folder Named by
Cs 122 Lab Questions Set 1: PRACTICE. Inside The PRACTICE Folder, Create Another Folder Named by
Page 1 of 2
values in the leftOperands and rightOperands stored at the same index location as the
operator.
8. Using a global constant or variable, declare an integer array of not more than 5 elements and
assign values to it in the main function. Use a separate function to display the values in the
array.
9. Write a program that consists of three parts: main(), enterValues() and printValues(). In
main(), declare a float array called myNumbers. Call function enterValues() to prompt the
user to enter values into the array. Call function printValues() to output the values in the
array. Use a global variable NUMBERS to hold the size of your array.
10. By examining the program you have written in 8 and the output it gives, do you think arrays
are passed to functions by value or by reference?
Page 2 of 2