Skip to content
Exam Guides

Test Bank for Starting Out With Visual C#, 5th Edition

Test Bank for Starting Out With Visual C#, 5th Edition offers a structured approach to exam preparation, helping you navigate complex topics and improve your performance.

Preview 16 of 86 pages

See the first 16 pages exactly as they appear in the document.

  1. Page 1
    Read page 1 as text

    Starting Out with Visual C#, 5e (Tony Gaddis) Chapter 1 Introduction to Computers and Programming TRUE/FALSE 1. Computers can perform a wide variety of tasks because they can be programmed in ways that are specific to the needs of applications. ANS: T 2. Today's microprocessors are less powerful than the larger electromechanical CPUs in early computers. ANS: F 3. RAM memory retains its contents when a computer is turned off. ANS: F 4. Programs are usually stored in main memory and loaded into secondary storage as needed. ANS: F 5. Most of a computer's RAM is stored in the same device that performs calculations. ANS: F 6. Data is not recorded magnetically on an optical disc but is encoded as a series of pits on the disc surface. ANS: T 7. The two general categories of software are system software and utility software. ANS: F 8. Some examples of application software are spreadsheet programs, Web browsers, games, and email programs. ANS: T 9. Any piece of data stored in a computer's memory must be stored as a decimal number. ANS: F 10. The largest value that can be stored in a byte is 1. ANS: F 11. The term 'pixel' stands for 'picture element.' ANS: T

  2. Page 2
  3. Page 3
    Read page 3 as text

    12. A binary number can only represent integer values from 0 through 255. ANS: F 13. A program is a list of instructions that tell the CPU to perform operations. ANS: T 14. The CPU can only execute machine language programs. ANS: T 15. A machine language instruction exists for each basic operation a CPU can do. ANS: T 16. If a program's source code contains a syntax error, it can still be translated to machine language by a compiler. ANS: F 17. In a program with a graphical user interface, all of the objects are always visible when the program starts. ANS: F 18. The C# language provides classes and other code necessary to create GUIs and perform many other advanced operations. ANS: F 19. The C# language allows you to write your own classes that have specific fields, properties, and methods for any application. ANS: T 20. The .NET framework provides classes to create Forms, TextBoxes, Labels, Buttons, and many other types of objects. ANS: T MULTIPLE CHOICE 1. A computer's memory is divided into tiny storage locations known as __________. a. sectors b. arrays c. cells d. bytes ANS: D 2. In the __________ numbering system, all numeric values are written as sequences of the digits 0 and 1. a. hexadecimal c. octal b. decimal d. binary

  4. Page 4
    Read page 4 as text

    ANS: D 3. Programs are commonly referred to as __________. a. applications c. software b. simulations d. firmware ANS: C 4. Which refers to all the physical devices or components of a computer? a. hardware c. machine b. workstation d. system ANS: A 5. The __________ is the part of a computer's hardware that executes each instruction in a program. a. CPU c. main memory b. software d. programming language ANS: A 6. __________ is a type of memory that can hold data for long periods of time, even when there is no power to the computer. a. RAM c. Application software b. Secondary storage d. Main memory ANS: B 7. The computer component that collects data and sends it to the computer is called a(n) __________. a. storage device c. sending unit b. output device d. input device ANS: D 8. Any data that the computer produces and sends to another device, such as a video display or speaker, is known as __________. a. output b. software c. firmware d. multimedia ANS: A 9. A(n) __________ performs a specialized task that enhances the computer's operation or safeguards data. a. utility program c. USB drive b. secondary storage device d. operating system ANS: A 10. __________ is an extensive encoding scheme that is compatible with ASCII and can also represent the characters of many of the world's languages. a. Baudot code b. EBDIC c. ANSEL d. Unicode ANS: D 11. Before a computer can store a real number in memory, it must be encoded in __________.

  5. Page 5
    Read page 5 as text

    a. floating - point notation c. EBCDIC b. hexadecimal d. decimal mode ANS: A 12. A(n) __________ is any device that works with binary data. a. electronic module c. binary machine b. digital device d. computational tool ANS: B 13. Digital images are composed of tiny dots of color known as __________. a. halftone cells c. light - emitting diodes b. pixels d. raster elements ANS: B 14. A digital song is broken into small pieces known as ___________. a. tones b. pulses c. samples d. waves ANS: C 15. When a CPU executes each instruction in a program, it uses a process known as the __________. a. fetch - decode - execute cycle c. code assembly process b. ready - set - go phase d. compilation sequence ANS: A 16. Instead of using binary numbers for instructions, assembly language uses short words known as __________. a. mnemonics b. keywords c. operators d. terms ANS: A 17. Words that have a predefined meaning in a high - level language are known as __________ or reserved words. a. mnemonics b. keywords c. pseudonyms d. semantics ANS: B 18. Programming languages have __________ that perform various operations on data. a. mnemonics b. keywords c. states d. operators ANS: D 19. A special program known as a(n) __________ is used to translate an assembly language program into a machine language program. a. interpreter c. translator b. assembler d. code conversion tool ANS: B

  6. Page 6
    Read page 6 as text

    20. A(n) __________ allows you to create powerful and complex programs without knowing how the CPU works and without writing a large amount of low - level instructions. a. assembler c. high - level language b. interpreter d. virtual language ANS: C 21. Each programming language has its own __________ which is a set of rules that must be strictly followed when writing a program. a. convention c. syntax b. conversion rules d. structure ANS: C 22. The individual instructions that you use to write a program in a high - level programming language are called __________. a. directives c. statements b. commands d. orders ANS: C 23. A(n) __________ is a mistake such as a misspelled keyword, a missing punctuation character, or the incorrect use of an operator. a. parsed anomaly c. code bug b. syntax error d. illegal operation ANS: B 24. Because GUI programs must respond to the actions of the user, they are said to be _________. a. response - based c. open - ended b. drag - and - drop d. event - driven ANS: D 25. When you use a(n) __________ language, you create programs by putting together a collection of objects. a. object - oriented c. collective b. object - based d. high - levek ANS: A 26. The data stored in an object are commonly called fields or __________. a. functions c. properties b. characteristics d. values ANS: C 27. The operations that an object can perform are called __________. a. actions b. events c. properties d. methods ANS: D

  7. Page 7
    Read page 7 as text

    28. In object - oriented programming with a GUI interface, a window displayed on the screen is called a __________. a. window object c. form object b. screen object d. frame object ANS: C 29. A __________ object displays text on a form. a. Text b. Font c. Character d. Label ANS: D 30. A __________ is code that describes a particular type of program object. a. class b. specification c. blueprint d. diagram ANS: A 31. Before beginning a new programming project, you must __________. a. design the program's logic c. write the program's code b. correct syntax errors d. understand the program's purpose ANS: D 32. A(n) __________ describes a set of well - defined logical steps that must be taken to perform a task. a. flowchart b. schematic c. algorithm d. outline ANS: C 33. An algorithm written out in plain English statements is called __________. a. prototyping b. pseudocode c. outlining d. quick - code ANS: B 34. A __________ is a diagram that graphically depicts the steps of an algorithm. a. flowchart c. schematic b. billboard d. hierarchy chart ANS: A 35. A(n) __________ is a mistake that does not prevent a program from starting but causes it to produce incorrect results. a. syntax error c. parse error b. logic error d. running error ANS: B 36. A(n) __________ provides all the necessary tools to create, test, and debug software. a. super computer b. integrated development environment (IDE) c. operating system d. software development kit (SDK) ANS: B

  8. Page 8
    Read page 8 as text

    37. In Visual Studi each Visual C# application you create is called a __________. a. solution b. file c. source d. project ANS: A 38. When you create a Visual C# application, use the __________ window to examine and change a control's properties. a. Properties c. Designer b. Solution Explorer d. Attributes ANS: A 39. When you create a new project using Visual Studio, it will be stored in a __________ at the location you specify on your computer's disk. a. Solution folder c. Solution file b. Project folder d. System file ANS: A 40. A computer stores a program while the program is running as well as the data used by the program in __________. a. main memory c. the CPU b. the software d. secondary storage ANS: A

  9. Page 9
    Read page 9 as text

    Starting Out with Visual C#, 5e (Tony Gaddis) Chapter 2 Introduction to Visual C# TRUE/FALSE 1. A control's Visible property cannot be modified in code. ANS: F 2. When you use the Properties window to change a control's Visible property at design time, the control will become invisible in the Designer . ANS: F 3. When a method executes, the statements in the method always execute in the order that they appear, from the beginning of the method to the end. ANS: T 4. Comments are short notes intended for the compiler to read and interpret. ANS: F 5. If you double - click an error message in the Error List window, the code editor will highlight and display the line of code that caused the error. ANS: T 6. The appearance and other characteristics of a GUI object are determined by the object's properties. ANS: T 7. Changing a form's Text property will change the form's name. ANS: F 8. When you create Button controls, they are automatically given default names such as button1 , button2 , and so forth. ANS: T 9. A control's name should reflect the purpose of the control. ANS: T 10. C# identifiers can contain spaces after the first character. ANS: F 11. The only way to run a program in Visual Studio is to click the Start Debugging button on the toolbar. ANS: F

  10. Page 10
    Read page 10 as text

    12. C# source code files always end with the .cs extension. ANS: T 13. It is important that you do not modify the contents of the Form1.cs file because doing so will prevent the application from executing. ANS: F 14. Each opening brace ( { )of a code container must have a matching closing brace ( } ) later in the program. ANS: T 15. When an event handler is generated for a control by Visual Studio, it doesn't do anything until you add your own code. ANS: T 16. Ending a programming statement with a semicolon is not required in C#. ANS: F 17. In C# string literals can be enclosed in double quotes, single quotes, or a combination. ANS: F 18. In a C# application, all buttons on a form must share the same Click event handler in the form's source code file. ANS: F 19. A Label control's Text property is initially set to the same value as the Label control's name. ANS: T 20. The assignment operator assigns the value that appears on its left side to the item that appears on its right side. ANS: F MULTIPLE CHOICE 1. Which of the following is not a legal C# identifier? a. _calculateTotalButton b. printSalesReportButton c. clear_all_the_customer_names_button d. 1stPlayerStartButton ANS: D 2. Which of the following Button control names is a legal C# identifier?

  11. Page 11
    Read page 11 as text

    a. _DisplayOption5Button b. Exit!Button c. *Clear*Button* d. delete Record Button ANS: A 3. The __________ shows a description of an error, the name of the source code file containing the error, the error's line number and column number, and the name of the project. a. Debug dialog box c. Error List window b. Crash pop - up d. Just In Time debugger ANS: C 4. To close an application's form in code, use the __________ statement. a. me.Quit(); c. form.Exit(); b. this.Close(); d. app.Stop(); ANS: B 5. When you enter a statement into the code editor, Visual Studio analyzes it and, if a syntax error is found, it is __________. a. automatically corrected c. crossed out b. underlined with a jagged line d. highlighted ANS: B 6. The __________ file contains an application's start - up code which executes when the application runs. a. Main.cs c. Program.cs b. Code.cs d. Source.cs ANS: C 7. A __________ is a declared block in a program between braces ( {...} ) that holds classes. a. method b. program c. namespace d. list ANS: C 8. A(n) __________ is a logical container in a program that holds methods and other program elements. a. event b. program c. queue d. class ANS: D 9. The __________ directives that appear at the top of a C# source code file indicate which namespaces the program will use. a. include b. namespace c. public d. using ANS: D 10. If you want your code to execute a method, write a statement known as a(n) __________. a. event handler c. initialization routine b. executor statement d. method call

  12. Page 12
    Read page 12 as text

    ANS: D 11. Which of the following statements correctly displays the text Hello in a message box? a. Messagebox("Hello") b. MessageBox.Show("Hello"); c. msgBox(Hello); d. msgBox.show(Hello) ANS: B 12. The file named __________ contains code associated with a form named Form1 . a. Form1.cs c. Control.cs b. MainForm.cs d. Window.cs ANS: A 13. When you select an object in the Visual Studio Designer , the object's size, color, text, and other characteristics are displayed in the __________ window. a. Designer b. Editing c. Object d. Properties ANS: D 14. The Visual Studio __________ window shows a scrollable list of controls that you can add to a form. a. Collection b. Bank c. Toolbox d. Shelf ANS: C 15. When a piece of data such as 23 or Hello is written into a program's code, it is called a __________. a. constant b. sentinel c. value d. literal ANS: D 16. A(n) __________ is a sequence of one or more programming statements that perform some operation. a. algorithm b. method c. class d. namespace ANS: B 17. A(n) __________ is a method that executes when a specific event such as clicking the mouse takes place while an application is running. a. action sequencer c. event handler b. feature coordinator d. incident manager ANS: C 18. A(n) __________ event occurs on a control when the user clicks the mouse while an application is running. a. Action b. Click c. Live d. Mouse ANS: B 19. When you want to display text on a form but not allow the user to change the text, you use a ___________control.

  13. Page 13
    Read page 13 as text

    a. String b. Label c. Text d. Font ANS: B 20. A __________ property can be set to one of two possible values: true or false . a. Boolean b. Binary c. Singular d. Toggle ANS: A 21. In code you use a(n) __________ to store a value in a control's property. a. string literal c. dialog box b. assignment statement d. constant ANS: B 22. When a(n) __________ appears around an object in the Visual Studio Designer , it indicates that the object is selected and ready for editing. a. sizing handle c. bounding box b. editing icon d. frame ANS: C 23. __________ allow you to resize a selected object in the Visual Studio Designer by clicking and dragging the mouse when the mouse cursor becomes a two - headed arrow. a. Bounding boxes c. ToolTips b. Sizing handles d. Properties ANS: B 24. Which of the following statements would display the number 25 in a Label control named outputLabel ? a. outputLabel.Text = 25; b. outputLabel.Text = "25"; c. outputLabel(25); d. outputLabel = "25"; ANS: B 25. Which of the following statements would clear the text displayed in a Label control named cityLabel ? a. cityLabel.Text = "empty"; b. cityLabel.Text = "none"; c. cityLabel.Text = "clear"; d. cityLabel = ""; ANS: D 26. Assuming an application has a PictureBox control named profilePictureBox , which of the following assignment statements will hide the PictureBox from the user at runtime? a. profilePictureBox.Visible = False; b. profilePictureBox.Visible = false; c. profilePictureBox.Visible = True;

  14. Page 14
    Read page 14 as text

    d. profilePictureBox.Visible = true; ANS: B 27. Once you have created a PictureBox control, you use its __________ property to specify the image it will display. a. Picture b. Image c. Source d. Display ANS: B 28. __________ is a term that refers to an image's width to height ratio. a. Area c. Aspect ratio b. Bounding box d. UV map ANS: C 29. __________ are short notes placed in a program's source code that explain how the program works. a. Sketches c. Comments b. Tags d. Labels ANS: C 30. A(n) __________ appears on one line in a program and begins with two forward slashes ( // ). a. line comment c. block comment b. short comment d. documentation comment ANS: A 31. Which of the following are used by professional programmers to embed extensive documentation in a program's source code? a. line comments c. documentation comments b. block comments d. embedded comments ANS: C 32. The __________ property can be used to change a form's width and height. a. Area c. Size b. Resolution d. Rectangle ANS: C 33. Selecting the __________ button in the Properties window causes the items in the window to be displayed in logical groups. a. Grouped b. Categorized c. Ordered d. Type ANS: B 34. In the design window, you can click and drag a control to a new location when the mouse cursor is positioned inside the control and becomes a __________. a. two - headed arrow c. hand icon b. four - headed arrow d. scissor icon ANS: B

  15. Page 15
    Read page 15 as text

    35. To delete a control you can select it on a form and press the __________ key. a. Delete b. Z c. Tab d. X ANS: A 36. A control's __________ property identifies the control in the application's code and in the Visual Studio environment. a. Text b. Source c. Tag d. Name ANS: D 37. Control names are also known as __________, the same term used for variables in programs. a. tags c. values b. identifiers d. labels ANS: B 38. A file that contains program code is called a __________. a. source code file c. C# file b. program file d. cs file ANS: A 39. Just as a period marks the end of a statement, a(n) __________ marks the end of a programming statement in C#. a. space b. underscore c. semicolon d. dot ANS: C 40. When you have a project open in Visual Studio, the time during which you build the GUI and write the application's code is referred to as __________. a. prototyping c. visual planning b. design time d. application progression ANS: B

  16. Page 16
    Read page 16 as text

    Starting Out with Visual C#, 5e (Tony Gaddis) Chapter 4 Making Decisions TRUE/FALSE 1. The sequence structure is often used in programming because it can handle every type of task. ANS: F 2. If you are writing an if statement that has only one conditionally executed statement, you must enclose the conditionally executed statement in curly braces. ANS: F 3. The equality operator is written like this: = (with only one equals sign). ANS: F 4. It is often true that both sets of conditionally executed statements in an if - else statement are executed. ANS: F 5. Any if - else - if statement can be coded, alternatively, as a nested if - else statement. ANS: T 6. In order for an && expression to be true , only the expression on one side of the && operator needs to be true . ANS: F 7. If the expression on the left side of the || operator is true , the expression on the right side is not checked. ANS: T 8. The == operator cannot be used to compare string expressions. ANS: F 9. You should use try - catch statements primarily for exceptions that are beyond your control. ANS: T 10. Because the TryParse methods return either true or false , they are commonly called as the Boolean expression in an if statement. ANS: T 11. Check boxes are similar to radio buttons in that they are both mutully exclusive.

70 more pages in the full document

Unlock it once and it stays in your library, ready to chat with or turn into flashcards.

Unlock the full document
See all

Study this document with CramX

Once it is in your library, every tool can work from it.