Chapter 2
C# Programming: From Problem Analysis to Program Design · 12 exercises
Problem 1
ASP.NET creates which type of application? a. Windows b. console c. command d. Web e. services
3 step solution
Problem 4
\(\mathrm{A}(\mathrm{n}) \quad\) ______________ groups semantically related types under a single name. a. object b. class c. method d. namespace e. directive
4 step solution
Problem 5
programmers use: a. [ ] b. { } c. ( ) d. begin... end e. start... stop # To mark the beginning and end of a block of code, C# programmers use: a. [ ] b. { } c. ( ) d. begin... end e. start... stop
4 step solution
Problem 7
Which of the following is a signature for a method? a. Main( ) b. console.Writeline("Ok"); c. using Programming1 d. static System.Read ( ) e. none of the above
3 step solution
Problem 8
The fully qualified call to the method that allows the user to input a single character is: a. Console. System. Read ( ) b. System.console.Read( ) c. Console. System.Write ( ) d. System. Console.Write ( e. System. Console.ReadLine( )
8 step solution
Problem 9
Source code must be translated into machine code (also called native code). This twostep process begins with a(n): a. debugger b. editor c. interpreter d. JITer e. compiler
2 step solution
Problem 11
Source code must be translated into machine code (also called native code). This twostep process begins with a(n): a. debugger b. editor c. interpreter d. JITer e. compiler
3 step solution
Problem 12
To see the results of an application, you ___________ the code. a. compile b. JIT c. execute d. edit e. desk check
3 step solution
Problem 13
A console application is characterized by: a. containing a Main( ) class b. containing a Main( ) method c. featuring a GUI d. belonging to the Web Forms class e. requiring the use of a System.Interface namespace
3 step solution
Problem 15
Which of the following is a call to a method? a. Console.Write; b. Console.Write[“ok”]; c. Write.Console(“ok”); d. Console.Write(“ok”); e. none of the above
3 step solution
Problem 19
compiler available for download. # Search the Internet and identify the URL of one site, other than Microsoft, that has a C# compiler available for download.
4 step solution
Problem 23
Think algorithmically.Write a set of instructions for each of the following activities. Your algorithm should be so complete that you could give it to other people, and they could perform the task specified without asking additional questions. a. Make a peanut butter and jelly sandwich. b. Walk to your next class. c. Purchase a bottle of water from a vending machine.
6 step solution