y). Console.Write("B, ");. else. Console.Write("C, ");. }. else. Console.Write("D, ");. . 10. (TCO 6) C# code that might create a problem at runtime can be placed in a _____ block. Code that should execute regardless of an exception is then placed in a _____ block.. . 11. (TCO 4) Write a C# segment to set a variable to 16 and then test that variable to determine if it’s between 15 and 20. Print out the variable and the result of the test." /> y). Console.Write("B, ");. else. Console.Write("C, ");. }. else. Console.Write("D, ");. . 10. (TCO 6) C# code that might create a problem at runtime can be placed in a _____ block. Code that should execute regardless of an exception is then placed in a _____ block.. . 11. (TCO 4) Write a C# segment to set a variable to 16 and then test that variable to determine if it’s between 15 and 20. Print out the variable and the result of the test.">
of 1

CIS 170B Week 2 Quiz

Published on January 2018 | Categories: Finance | Downloads: 12 | Comments: 0
102 views

1. (TCO 4) A car dealership is running a promotion that includes a 25% discount on last year’s models. Which of the following is the appropriate structure to use to determine if a given car fits the criteria for the discount? 2. (TCO 6) When using the Visual Studio, press _____ to start debugging your program. 3. (TCO 6) The _____ window lets you observe the values of all local variables and expressions as your program executes with the debugger 4. (TCO 4) How is a Boolean expression represented on a flow chart? 5. (TCO 4) A conditional expression such as that in the statement “if (x < y)” produces a _____ result. 6. (TCO 4) Which of the following is true about the IF/ELSE decision structure? 7. (TCO 4) The following C# code _____ run, however it contains a _____ error. (Inspect the code carefully!) int x = 3, y = 2; if (x > y) Console.WriteLine(“x is less than y”); 8. (TCO 4) Given that a = 5, b = 6, and c = 8, which of the following is false? 9. (TCO 4) What will be the output of this code? int x = 3, y = 5; if (x + 2 > y) { Console.Write("A, "); if (x > y) Console.Write("B, "); else Console.Write("C, "); } else Console.Write("D, "); 10. (TCO 6) C# code that might create a problem at runtime can be placed in a _____ block. Code that should execute regardless of an exception is then placed in a _____ block. 11. (TCO 4) Write a C# segment to set a variable to 16 and then test that variable to determine if it’s between 15 and 20. Print out the variable and the result of the test.

Comments

Content

1. (TCO 4) A car dealership is running a promotion that includes a 25% discount on last year’s models. Which of the following is the appropriate structure to use to determine if a given car fits the criteria for the discount? 2. (TCO 6) When using the Visual Studio, press _____ to start debugging your program. 3. (TCO 6) The _____ window lets you observe the values of all local variables and expressions as your program executes with the debugger 4. (TCO 4) How is a Boolean expression represented on a flow chart? 5. (TCO 4) A conditional expression such as that in the statement “if (x < y)” produces a _____ result. 6. (TCO 4) Which of the following is true about the IF/ELSE decision structure? 7. (TCO 4) The following C# code _____ run, however it contains a _____ error. (Inspect the code carefully!) int x = 3, y = 2; if (x > y) Console.WriteLine(“x is less than y”); 8. (TCO 4) Given that a = 5, b = 6, and c = 8, which of the following is false? 9. (TCO 4) What will be the output of this code? int x = 3, y = 5; if (x + 2 > y) { Console.Write("A, "); if (x > y) Console.Write("B, "); else Console.Write("C, "); } else Console.Write("D, "); 10. (TCO 6) C# code that might create a problem at runtime can be placed in a _____ block. Code that should execute regardless of an exception is then placed in a _____ block. 11. (TCO 4) Write a C# segment to set a variable to 16 and then test that variable to determine if it’s between 15 and 20. Print out the variable and the result of the test.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close