(TCO 11) Write a C# program to store an array
(TCO 11) Write a C# program to store an array of integers 10 through 19. Use an appropriate loop to multiply all of the values in the list. Print out the result. (Points : 30)
(TCO 8) Briefly describe how parameter passing by-value and by-reference are accomplished in memory. Write statement 1 to call method A below. Write statement 2 to call method B. Which method uses pass by-value? Which method uses pass by-reference?
static void Main()
{
int balance = 15000;
//statement 1
//statement 2
}
//method A
public static void addBonus(ref int balance)
{
balance = balance + 1000;
}
//method B
public static int addBonus(int balance)
{
return (balance + 1000);
}
(Points : 30)
(TCO 5) Describe two types of loops that can be used to print every third integer from 0 to 300 (i.e., 0, 3, 6, 9, etc.), each on its own line. Which would be a better choice and why? Write the code using that type of loop. (Points : 20)
11 years ago
Purchase the answer to view it

- tco_11.docx