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.

Claire Mitchell
Contributor
4.5
30
10 months ago
Preview (16 of 86 Pages)
100%
Log in to unlock

Page 1

Test Bank for Starting Out With Visual C#, 5th Edition - Page 1 preview image

Loading page ...

Starting Out with Visual C#, 5e (Tony Gaddis)Chapter 1 Introduction to Computers and ProgrammingTRUE/FALSE1.Computers can perform a wide variety of tasks because they can be programmed in ways that arespecific to the needs ofapplications.ANS:T2.Today's microprocessors are less powerful than the larger electromechanical CPUs in early computers.ANS:F3.RAM memory retains its contents when a computer is turned off.ANS:F4.Programs are usually stored in mainmemory and loaded into secondary storage as needed.ANS:F5.Most of a computer's RAM is stored in the same device that performs calculations.ANS:F6.Data is not recorded magnetically on an optical disc but is encoded as a series of pits on the discsurface.ANS:T7.The two general categories of software are system software and utility software.ANS:F8.Some examples of application software are spreadsheet programs, Web browsers, games, and emailprograms.ANS:T9.Any piece ofdata stored in a computer's memory must be stored as a decimal number.ANS:F10.The largest value that can be stored in a byte is 1.ANS:F11.The term 'pixel' stands for 'picture element.'ANS:T

Page 2

Test Bank for Starting Out With Visual C#, 5th Edition - Page 2 preview image

Loading page ...

Page 3

Test Bank for Starting Out With Visual C#, 5th Edition - Page 3 preview image

Loading page ...

12.A binary number can only represent integer values from 0 through 255.ANS:F13.A program is a list of instructions that tell the CPU to perform operations.ANS:T14.The CPU can only execute machine language programs.ANS:T15.A machine language instruction exists for each basicoperation a CPU can do.ANS:T16.If a program's source code contains a syntax error, it can still be translated to machine language by acompiler.ANS:F17.In a program with a graphical user interface, all of the objects are always visible when the programstarts.ANS:F18.The C# language provides classes and other code necessary to create GUIs and perform many otheradvanced operations.ANS:F19.The C# language allows you to write your own classes that have specific fields,properties, andmethods for any application.ANS:T20.The .NET framework provides classes to create Forms, TextBoxes, Labels, Buttons, and many othertypes of objects.ANS:TMULTIPLE CHOICE1.Acomputer's memory is divided into tinystorage locations known as __________.a.sectorsb.arraysc.cellsd.bytesANS:D2.In the __________ numbering system, all numeric values are written as sequences of the digits 0 and1.a.hexadecimalc.octalb.decimald.binary

Page 4

Test Bank for Starting Out With Visual C#, 5th Edition - Page 4 preview image

Loading page ...

ANS:D3.Programs are commonly referred to as __________.a.applicationsc.softwareb.simulationsd.firmwareANS:C4.Which refers to all the physical devices or components of a computer?a.hardwarec.machineb.workstationd.systemANS:A5.The __________ is the part of a computer's hardware that executes each instruction in a program.a.CPUc.main memoryb.softwared.programming languageANS:A6.__________ is a type of memory that canhold data for long periods of time, even when there is nopower to the computer.a.RAMc.Application softwareb.Secondary storaged.Main memoryANS:B7.The computer component that collects data and sends it to the computer is called a(n)__________.a.storage devicec.sending unitb.output deviced.input deviceANS:D8.Any data that the computer produces and sends to another device, such as a video display or speaker,is known as __________.a.outputb.softwarec.firmwared.multimediaANS:A9.A(n) __________ performs a specialized task that enhances the computer's operation or safeguardsdata.a.utility programc.USB driveb.secondary storage deviced.operating systemANS:A10.__________ is an extensive encoding scheme that is compatible with ASCII and can also represent thecharacters of many of the world's languages.a.Baudot codeb.EBDICc.ANSELd.UnicodeANS:D11.Before a computer can store a real number inmemory, it must be encoded in __________.

Page 5

Test Bank for Starting Out With Visual C#, 5th Edition - Page 5 preview image

Loading page ...

a.floating-point notationc.EBCDICb.hexadecimald.decimal modeANS:A12.A(n) __________ is any device that works with binary data.a.electronic modulec.binary machineb.digital deviced.computational toolANS:B13.Digital images are composed of tiny dots of color known as __________.a.halftone cellsc.light-emitting diodesb.pixelsd.raster elementsANS:B14.A digital song is broken into small pieces known as___________.a.tonesb.pulsesc.samplesd.wavesANS:C15.When a CPU executes each instruction in a program, it uses a process known as the __________.a.fetch-decode-execute cyclec.code assembly processb.ready-set-go phased.compilation sequenceANS:A16.Instead of using binary numbers for instructions, assembly language uses short words known as__________.a.mnemonicsb.keywordsc.operatorsd.termsANS:A17.Words that have a predefined meaning in ahigh-level language are known as __________ or reservedwords.a.mnemonicsb.keywordsc.pseudonymsd.semanticsANS:B18.Programming languages have __________ that perform various operations on data.a.mnemonicsb.keywordsc.statesd.operatorsANS:D19.A special program known as a(n) __________ is used to translate an assembly language program intoa machine language program.a.interpreterc.translatorb.assemblerd.code conversion toolANS:B

Page 6

Test Bank for Starting Out With Visual C#, 5th Edition - Page 6 preview image

Loading page ...

20.A(n)__________ allows you to create powerful and complex programs without knowing how theCPU works and without writing a large amount of low-level instructions.a.assemblerc.high-level languageb.interpreterd.virtual languageANS:C21.Eachprogramming language has its own __________ which is a set of rules that must be strictlyfollowed when writing a program.a.conventionc.syntaxb.conversion rulesd.structureANS:C22.The individual instructions that you use to write aprogram in a high-level programming language arecalled __________.a.directivesc.statementsb.commandsd.ordersANS:C23.A(n) __________ is a mistake such as a misspelled keyword, a missing punctuation character, or theincorrect use of anoperator.a.parsed anomalyc.code bugb.syntax errord.illegal operationANS:B24.Because GUI programs must respond to the actions of the user, they are said to be _________.a.response-basedc.open-endedb.drag-and-dropd.event-drivenANS:D25.When you use a(n) __________ language, you create programs by putting together a collection ofobjects.a.object-orientedc.collectiveb.object-basedd.high-levekANS:A26.The data stored in an object arecommonly called fields or __________.a.functionsc.propertiesb.characteristicsd.valuesANS:C27.The operations that an object can perform are called __________.a.actionsb.eventsc.propertiesd.methodsANS:D

Page 7

Test Bank for Starting Out With Visual C#, 5th Edition - Page 7 preview image

Loading page ...

28.Inobject-oriented programming with a GUI interface, a window displayed on the screen is called a__________.a.window objectc.form objectb.screen objectd.frame objectANS:C29.A __________ object displays text on a form.a.Textb.Fontc.Characterd.LabelANS:D30.A __________ is code that describes a particular type of program object.a.classb.specificationc.blueprintd.diagramANS:A31.Before beginning a new programming project, you must __________.a.design theprogram's logicc.write the program's codeb.correct syntax errorsd.understand the program's purposeANS:D32.A(n) __________ describes a set of well-defined logical steps that must be taken to perform a task.a.flowchartb.schematicc.algorithmd.outlineANS:C33.An algorithm written out in plain English statements is called __________.a.prototypingb.pseudocodec.outliningd.quick-codeANS:B34.A __________ is a diagram that graphically depicts the steps of analgorithm.a.flowchartc.schematicb.billboardd.hierarchy chartANS:A35.A(n) __________ is a mistake that does not prevent a program from starting but causes it to produceincorrect results.a.syntax errorc.parse errorb.logic errord.running errorANS:B36.A(n) __________ provides all the necessary tools to create, test, and debug software.a.super computerb.integrated development environment (IDE)c.operating systemd.software development kit (SDK)ANS:B

Page 8

Test Bank for Starting Out With Visual C#, 5th Edition - Page 8 preview image

Loading page ...

37.InVisual Studi each Visual C# application you create is called a __________.a.solutionb.filec.sourced.projectANS:A38.When you create a Visual C# application, use the __________ window to examine and change acontrol's properties.a.Propertiesc.Designerb.Solution Explorerd.AttributesANS:A39.When you create a new project using Visual Studio, it will be stored in a __________ at the locationyou specify on your computer's disk.a.Solution folderc.Solution fileb.Project folderd.System fileANS:A40.A computer stores a program while the program is running as well as the data used by the program in__________.a.main memoryc.the CPUb.the softwared.secondary storageANS:A

Page 9

Test Bank for Starting Out With Visual C#, 5th Edition - Page 9 preview image

Loading page ...

Starting Out with Visual C#, 5e (Tony Gaddis)Chapter 2 Introduction to Visual C#TRUE/FALSE1.A control's Visible property cannot be modified in code.ANS:F2.When you use thePropertieswindow to change a control's Visible property at design time, the controlwill become invisible in theDesigner.ANS:F3.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:T4.Comments are short notes intended for the compiler to read and interpret.ANS:F5.If you double-click an error message in theError Listwindow, the code editor will highlight anddisplay the line of code that caused theerror.ANS:T6.The appearance and other characteristics of a GUI object are determined by the object's properties.ANS:T7.Changing a form's Text property will change the form's name.ANS:F8.When you create Button controls, they are automatically given default names such asbutton1,button2, and so forth.ANS:T9.A control's name should reflect the purpose of the control.ANS:T10.C# identifiers can contain spaces after thefirst character.ANS:F11.The only way to run a program in Visual Studio is to click theStart Debuggingbutton on the toolbar.ANS:F

Page 10

Test Bank for Starting Out With Visual C#, 5th Edition - Page 10 preview image

Loading page ...

12.C# source code files always end with the.csextension.ANS:T13.It is important that you do not modify the contents of theForm1.csfile because doing so willprevent the application from executing.ANS:F14.Each opening brace ({)of a code container must have a matching closing brace (}) later in theprogram.ANS:T15.When an eventhandler is generated for a control by Visual Studio, it doesn't do anything until you addyour own code.ANS:T16.Ending a programming statement with a semicolon is not required in C#.ANS:F17.In C# string literals can be enclosed in double quotes, single quotes, or a combination.ANS:F18.In a C# application, all buttons on a form must share the same Click event handler in the form's sourcecode file.ANS:F19.A Labelcontrol's Text property is initially set to the same value as the Label control's name.ANS:T20.The assignment operator assigns the value that appears on its left side to the item that appears on itsright side.ANS:FMULTIPLE CHOICE1.Which of the following isnota legal C# identifier?a._calculateTotalButtonb.printSalesReportButtonc.clear_all_the_customer_names_buttond.1stPlayerStartButtonANS:D2.Which of the following Button control names is a legal C#identifier?

Page 11

Test Bank for Starting Out With Visual C#, 5th Edition - Page 11 preview image

Loading page ...

a._DisplayOption5Buttonb.Exit!Buttonc.*Clear*Button*d.delete Record ButtonANS:A3.The __________ shows a description of an error, the name of the source code file containing the error,the error's line number and columnnumber, and the name of the project.a.Debugdialog boxc.Error Listwindowb.Crashpop-upd.Just In TimedebuggerANS:C4.To close an application's form in code, use the __________ statement.a.me.Quit();c.form.Exit();b.this.Close();d.app.Stop();ANS:B5.When you enter a statement into the code editor, Visual Studio analyzes it and, if a syntax error isfound, it is __________.a.automatically correctedc.crossed outb.underlined with a jagged lined.highlightedANS:B6.The __________ file contains an application's start-up code which executes when the application runs.a.Main.csc.Program.csb.Code.csd.Source.csANS:C7.A __________ is a declared block in a program between braces ({...}) that holds classes.a.methodb.programc.namespaced.listANS:C8.A(n) __________ is a logical container in a program that holds methods and other program elements.a.eventb.programc.queued.classANS:D9.The __________ directives that appear at the top of a C# source code file indicate which namespacesthe program will use.a.includeb.namespacec.publicd.usingANS:D10.If you want your code to execute a method, write a statement known asa(n) __________.a.event handlerc.initialization routineb.executor statementd.method call

Page 12

Test Bank for Starting Out With Visual C#, 5th Edition - Page 12 preview image

Loading page ...

ANS:D11.Which of the following statements correctly displays the textHelloin a message box?a.Messagebox("Hello")b.MessageBox.Show("Hello");c.msgBox(Hello);d.msgBox.show(Hello)ANS:B12.The file named __________ contains code associated with a form namedForm1.a.Form1.csc.Control.csb.MainForm.csd.Window.csANS:A13.When you select an object in the Visual StudioDesigner, the object's size, color, text, and othercharacteristics are displayed in the __________ window.a.Designerb.Editingc.Objectd.PropertiesANS:D14.The Visual Studio __________window shows a scrollable list of controls that you can add to a form.a.Collectionb.Bankc.Toolboxd.ShelfANS:C15.When a piece of data such as23orHellois written into a program's code, it is called a __________.a.constantb.sentinelc.valued.literalANS:D16.A(n) __________ is a sequence of one or more programming statements that perform some operation.a.algorithmb.methodc.classd.namespaceANS:B17.A(n) __________ is a method that executes when a specific event such as clicking the mouse takesplace while an application is running.a.action sequencerc.event handlerb.feature coordinatord.incident managerANS:C18.A(n) __________ event occurs on a control when the user clicks the mouse while an application isrunning.a.Actionb.Clickc.Lived.MouseANS:B19.When you want to display text on a form but not allow the user to change the text, you use a___________control.

Page 13

Test Bank for Starting Out With Visual C#, 5th Edition - Page 13 preview image

Loading page ...

a.Stringb.Labelc.Textd.FontANS:B20.A __________ property can be set to one of two possible values:trueorfalse.a.Booleanb.Binaryc.Singulard.ToggleANS:A21.In code you use a(n) __________ to store avalue in a control's property.a.string literalc.dialog boxb.assignment statementd.constantANS:B22.When a(n) __________ appears around an object in the Visual StudioDesigner, it indicates that theobject is selected and ready forediting.a.sizing handlec.bounding boxb.editing icond.frameANS:C23.__________ allow you to resize a selected object in the Visual StudioDesignerby clicking anddragging the mouse when the mouse cursor becomes a two-headed arrow.a.Bounding boxesc.ToolTipsb.Sizing handlesd.PropertiesANS:B24.Which of the following statements would display the number25in a Label control namedoutputLabel?a.outputLabel.Text = 25;b.outputLabel.Text = "25";c.outputLabel(25);d.outputLabel = "25";ANS:B25.Which of the following statements would clear the text displayed in a Label control namedcityLabel?a.cityLabel.Text = "empty";b.cityLabel.Text = "none";c.cityLabel.Text = "clear";d.cityLabel = "";ANS:D26.Assuming an application has a PictureBox control namedprofilePictureBox, which of thefollowing assignment statements will hide the PictureBox from the user at runtime?a.profilePictureBox.Visible = False;b.profilePictureBox.Visible = false;c.profilePictureBox.Visible = True;

Page 14

Test Bank for Starting Out With Visual C#, 5th Edition - Page 14 preview image

Loading page ...

d.profilePictureBox.Visible = true;ANS:B27.Once you have created a PictureBox control, you use its __________ property to specify the image itwill display.a.Pictureb.Imagec.Sourced.DisplayANS:B28.__________ is a term that refers to an image's width to height ratio.a.Areac.Aspect ratiob.Bounding boxd.UV mapANS:C29.__________ are short notes placed in a program's source code that explain how the program works.a.Sketchesc.Commentsb.Tagsd.LabelsANS:C30.A(n) __________ appears on one line in a program and begins with two forward slashes (//).a.line commentc.block commentb.short commentd.documentation commentANS:A31.Which ofthe following are used by professional programmers to embed extensive documentation in aprogram's source code?a.line commentsc.documentation commentsb.block commentsd.embedded commentsANS:C32.The __________ property can be used tochange a form's width and height.a.Areac.Sizeb.Resolutiond.RectangleANS:C33.Selecting the __________ button in thePropertieswindow causes the items in the window to bedisplayed in logical groups.a.Groupedb.Categorizedc.Orderedd.TypeANS:B34.In the design window, you can click and drag a control to a new location when the mouse cursor ispositioned insidethe control and becomes a __________.a.two-headed arrowc.hand iconb.four-headed arrowd.scissor iconANS:B

Page 15

Test Bank for Starting Out With Visual C#, 5th Edition - Page 15 preview image

Loading page ...

35.To delete a control you can select it on a form and press the __________ key.a.Deleteb.Zc.Tabd.XANS:A36.Acontrol's __________ property identifies the control in the application's code and in the VisualStudio environment.a.Textb.Sourcec.Tagd.NameANS:D37.Control names are also known as __________, the same term used for variables inprograms.a.tagsc.valuesb.identifiersd.labelsANS:B38.A file that contains program code is called a __________.a.source code filec.C# fileb.program filed.cs fileANS:A39.Just as a period marks the end of astatement, a(n) __________ marks the end of a programmingstatement in C#.a.spaceb.underscorec.semicolond.dotANS:C40.When you have a project open in Visual Studio, the time during which you build the GUI and write theapplication's code is referred to as __________.a.prototypingc.visual planningb.design timed.application progressionANS:B

Page 16

Test Bank for Starting Out With Visual C#, 5th Edition - Page 16 preview image

Loading page ...

Starting Out with Visual C#, 5e (Tony Gaddis)Chapter 4 Making DecisionsTRUE/FALSE1.The sequence structure is often used in programming because it can handle every type of task.ANS:F2.If you are writing anifstatement that has only one conditionally executed statement, you mustenclose the conditionally executed statement in curly braces.ANS:F3.The equality operator is written like this:=(with only one equals sign).ANS:F4.It is often true that both sets of conditionally executed statements in anif-elsestatement areexecuted.ANS:F5.Anyif-else-ifstatement can be coded, alternatively, as a nestedif-elsestatement.ANS:T6.In order for an&&expression to betrue, only the expression on one side of the&&operator needs tobetrue.ANS:F7.If the expression on the left side of the||operator istrue, the expression on the right side is notchecked.ANS:T8.The==operator cannot be used to compare string expressions.ANS:F9.You should usetry-catchstatements primarily for exceptions that are beyond your control.ANS:T10.Because theTryParsemethods return eithertrueorfalse, they are commonlycalled as theBoolean expression in anifstatement.ANS:T11.Check boxes are similar to radio buttons in that they are both mutully exclusive.
Preview Mode

This document has 86 pages. Sign in to access the full document!