©2014 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.

Starting Out with Visual C# 2012

Chapter 1Introduction to Computers and Programming

Multiple Choice

  1. A(n) ______is a set of instructions that a computer follows to perform a task.
  2. algorithm
  3. program
  4. formula
  5. method

ANS: B

  1. Programs are commonly referred to as ______.
  2. applications
  3. simulations
  4. software
  5. firmware

ANS: C

  1. A programmer, or software developer, is a person with the training and skills necessary to ______computer programs.
  2. design
  3. create
  4. test
  5. All of the above

ANS: D

  1. ______refers to all the physical devices, or components, of which a computer is made.
  2. Hardware
  3. Workstation
  4. Machine
  5. System

ANS: A

  1. When a computer is performing the tasks that a program tells it to do, we say that the computer is running, or ______the program.
  2. compiling
  3. processing
  4. executing
  5. reading

ANS: C

  1. The ______is the part of a computer that actually runs programs.
  2. CPU
  3. software
  4. main memory
  5. programming language

ANS: A

  1. The ______is considered by many to be the world’s first programmable electronic computer.
  2. UNIVAC
  3. ENIAC
  4. Apple II
  5. Harvard MARK I

ANS: B

  1. Today, CPUs are small chips known as ______.
  2. parallel processors
  3. microprocessors
  4. mini-CPUs
  5. super computers

ANS: B

  1. ______is where the computer stores a program while the program is running, as well as the data that the program is working with.
  2. Main memory
  3. Software
  4. The CPU
  5. Secondary storage

ANS: A

  1. Main memory is commonly known as ______, or RAM.
  2. random-access memory
  3. read-append memory
  4. random-asynchronous memory
  5. readily-available memory

ANS: A

  1. When the computer is turned off, the contents of ______are erased.
  2. secondary storage
  3. RAM
  4. software
  5. hardware

ANS: B

  1. ______is a type of memory that can hold data for long periods of time, even when there is no power to the computer.
  2. RAM
  3. Secondary storage
  4. Application software
  5. Main memory

ANS: B

  1. A(n) ______stores data by magnetically encoding it onto a circular disk.
  2. CPU
  3. output device
  4. program
  5. disk drive

ANS: D

  1. A ______records data onto a small floppy disk, which can be removed from the drive.
  2. USB drive
  3. hard drive
  4. floppy disk drive
  5. DVD

ANS: C

  1. ______are small devices that plug into the computer’s USB port and appear to the system as disk drives.
  2. Virtual disk drives
  3. Universal serial bus (USB) drives
  4. Floppy disk drives
  5. External disk drives

ANS: B

  1. The compact disk (CD) and digital versatile disk (DVD) are known as ______devices.
  2. optical
  3. binary
  4. legacy
  5. encoded

ANS: A

  1. ______is any data the computer collects from people and from other devices.
  2. Telemetry
  3. Input
  4. Information
  5. Storage

ANS: B

  1. The component that collects the data and sends it to the computer is called a(n) ______.
  2. storage device
  3. output device
  4. sending unit
  5. input device

ANS: D

  1. ______is any data the computer produces for people or for other devices.
  2. Output
  3. Software
  4. Firmware
  5. Media

ANS: A

  1. Data produced by the computer is sent to a(n) ______, which formats and presents it.
  2. input device
  3. output device
  4. storage device
  5. program

ANS: B

  1. The programs that control and manage the basic operations of a computer are generally referred to as ______.
  2. application software
  3. RAM
  4. system software
  5. output devices

ANS: C

  1. A(n) ______is the most fundamental set of programs on a computer.
  2. kernel
  3. device driver
  4. operating system
  5. Web browser

ANS: C

  1. A(n) ______performs a specialized task that enhances the computer’s operation or safeguards data.
  2. utility program
  3. secondary storage device
  4. USB drive
  5. operating system

ANS: A

  1. The software tools that programmers use to create, modify, and test software are referred to as ______.
  2. utility programs
  3. software development tools
  4. device drivers
  5. application software

ANS: B

  1. Programs that make a computer useful for everyday tasks are known as ______.
  2. operating systems
  3. utility programs
  4. application software
  5. system software

ANS: C

  1. A computer’s memory is divided into tiny storage locations known as ______.
  2. sectors
  3. arrays
  4. cells
  5. bytes

ANS: D

  1. One ______is enough memory to store only a letter of the alphabet or a small number.
  2. bit
  3. byte
  4. sector
  5. cell

ANS: B

  1. Each byte is divided into eight smaller storage locations known as ______.
  2. nibbles
  3. pixels
  4. bits
  5. words

ANS: C

  1. The term bit stands for ______.
  2. binary digit
  3. basic integer
  4. Boolean type
  5. big-endian format

ANS: A

  1. In computer systems, a bit that is turned off represents the number ______and a bit that is turned on represents the number 1.
  2. -1
  3. 0
  4. 255
  5. 10

ANS: B

  1. In the ______numbering system, all numeric values are written as sequences of 0s and 1s.
  2. hexadecimal
  3. decimal
  4. octal
  5. binary

ANS: D

  1. ______is a set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters.
  2. ANSI
  3. Unicode
  4. ASCII
  5. IEEE

ANS: C

  1. ______is an extensive encoding scheme that is compatible with ASCII and can also represent the characters of many of the world’s languages.
  2. Baudot code
  3. EBCDIC
  4. ANSEL
  5. Unicode

ANS: D

  1. Computers are able to store negative numbers in memory by using a technique known as ______.
  2. ASCII
  3. two’s complement
  4. bit block transfer
  5. Unicode

ANS: B

  1. Before the computer can store a real number in memory, it must be encoded in ______.
  2. floating-point notation
  3. hexadecimal
  4. EBCDIC
  5. decimal mode

ANS: A

  1. The term ______can be used to describe anything that uses binary numbers.
  2. electronic
  3. digital
  4. organic
  5. computer

ANS: B

  1. ______is data that is stored in binary.
  2. Bitwise data
  3. Electronic information
  4. Digital data
  5. Biometric data

ANS: C

  1. A(n) ______is any device that works with binary data.
  2. electronic module
  3. digital device
  4. binary machine
  5. computational tool

ANS: B

  1. Digital images are composed of tiny dots of color known as ______.
  2. halftone cells
  3. pixels
  4. light-emitting diodes
  5. raster elements

ANS: B

  1. A digital song is broken into small pieces known as ______.
  2. tones
  3. samples
  4. pentameters
  5. waves

ANS: B

  1. A computer’s CPU can only understand instructions that are written in ______.
  2. main memory
  3. mnemonics
  4. assembly language
  5. machine language

ANS: D

  1. The entire set of instructions that a CPU can execute is known as the CPU’s ______.
  2. instruction set
  3. command list
  4. mnemonic dictionary
  5. logic glossary

ANS: A

  1. When a CPU executes the instructions in a program, it is engaged in a process that is known as the ______.
  2. fetch-decode-execute cycle
  3. ready-set-go phase
  4. code assembly process
  5. compilation sequence

ANS: A

  1. ______was created in the early days of computing as an alternative to machine language.
  2. FORTRAN
  3. COBOL
  4. assembly language
  5. Pascal

ANS: C

  1. Instead of using binary numbers for instructions, assembly language uses short words that are known as ______.
  2. mnemonics
  3. keywords
  4. operators
  5. terms

ANS: A

  1. A special program known as a(n) ______is used to translate an assembly language program to a machine language program.
  2. compiler
  3. assembler
  4. translator
  5. codex

ANS: B

  1. Because assembly language is so close in nature to machine language, it is referred to as a ______.
  2. high-level language
  3. low-level language
  4. machine-like language
  5. linked language

ANS: B

  1. A(n) ______allows you to create powerful and complex programs without knowing how the CPU works and without writing large numbers of low-level instructions.
  2. assembler
  3. interpreter
  4. high-level language
  5. virtual language

ANS: C

  1. The words that make up a high-level language are known as ______or reserved words.
  2. mnemonics
  3. pseudonyms
  4. keywords
  5. semantics

ANS: C

  1. Programming languages have ______that perform various operations on data.
  2. keywords
  3. mnemonics
  4. states
  5. operators

ANS: D

  1. Each programming language has its own ______, which is a set of rules that must be strictly followed when writing a program.
  2. syntax
  3. convention
  4. grammar
  5. structure

ANS: A

  1. The individual instructions that you use to write a program in a high-level programming language are called ______.
  2. directives
  3. commands
  4. statements
  5. orders

ANS: C

  1. A(n) ______is a program that translates a high-level language program into a separate machine language program.
  2. parser
  3. interpreter
  4. compiler
  5. assembler

ANS: C

  1. A(n) ______is a program that both translates and executes the instructions in a high-level language program.
  2. compiler
  3. interpreter
  4. assembler
  5. lexical analyzer

ANS: B

  1. The statements that a programmer writes in a high-level language are called ______, or simply code.
  2. source code
  3. high-level text
  4. program font
  5. simple script

ANS: A

  1. A(n) ______is a mistake such as a misspelled keyword, a missing punctuation character, or the incorrect use of an operator.
  2. parsed anomaly
  3. syntax error
  4. code bug
  5. illegal operation

ANS: B

  1. Programmers commonly use the term ______to describe any hypothetical person that might be using a computer and its programs.
  2. user
  3. customer
  4. patient
  5. client

ANS: A

  1. A computer’s ______is the part of the computer with which the user interacts.
  2. operating system
  3. monitor
  4. Input device
  5. user interface

ANS: D

  1. A(n) ______, which is also known as a console interface, requires the user to type commands.
  2. command prompt
  3. console
  4. command line interface
  5. terminal

ANS: C

  1. A(n) ______, or GUI, allows the user to interact with the operating system and application programs through graphical elements on the screen.
  2. general-purpose interface
  3. graphical user interface
  4. generic unified interface
  5. graphics utility interface

ANS: B

  1. Because GUI programs must respond to the actions of the user, they are said to be ______.
  2. response-based
  3. drag-and-drop
  4. open-ended
  5. event-driven

ANS: D

  1. When you use a(n) ______language, you create programs by putting together a collection of objects.
  2. object-oriented
  3. object-based
  4. collective
  5. high-level

ANS: A

  1. The data stored in an object are commonly called fields, or ______.
  2. attributes
  3. characteristics
  4. properties
  5. values

ANS: C

  1. The operations that an object can perform are called ______.
  2. actions
  3. events
  4. behaviors
  5. methods

ANS: D

  1. In object-oriented programming, a window that is displayed on the screen is called a ______.
  2. window object
  3. screen object
  4. form object
  5. frame object

ANS: C

  1. A ______object displays text on a form.
  2. Text
  3. Font
  4. Character
  5. Label

ANS: D

  1. A ______object appears as a rectangular region that can accept keyboard input from the user.
  2. True-type
  3. Textbox
  4. Rectangle
  5. Notepad

ANS: B

  1. A ______object appears on a form as a button with a caption written across its face.
  2. Button
  3. Banner
  4. Checkbox
  5. Frame

ANS: A

  1. Objects that are visible in a program’s graphical user interface are commonly referred to as ______.
  2. opaque
  3. interactive
  4. controls
  5. components

ANS: C

  1. A ______is code that describes a particular type of object.
  2. class
  3. specification
  4. blueprint
  5. diagram

ANS: A

  1. The ______is a collection of classes and other code that can be used, along with a programming language such as C#, to create programs for the Windows operating system.
  2. MSDN Library
  3. .NET Framework
  4. Sync Framework
  5. Windows SDK

ANS: B

  1. The entire process of creating a program is known as the ______.
  2. art of software development
  3. program development cycle
  4. computer science sequence
  5. code-test-debug cycle

ANS: B

  1. When beginning a new programming project, it is essential that you ______.
  2. design the program’s logic
  3. correct syntax errors
  4. write the program’s code
  5. understand the program’s purpose

ANS: D

  1. Once you clearly understand what the program is supposed to do, you can ______.
  2. test the program and correct logic errors
  3. correct syntax errors
  4. design the program’s GUI
  5. design the program’s logic

ANS: C

  1. A(n) ______is a set of well-defined, logical steps that must be taken to perform a task.
  2. flowchart
  3. schematic
  4. algorithm
  5. outline

ANS: C

  1. An algorithm that is written out in plain English statements is called ______.
  2. prototyping
  3. pseudocode
  4. outlining
  5. quick-code

ANS: B

  1. A ______is a diagram that graphically depicts the steps of an algorithm.
  2. flowchart
  3. billboard
  4. schematic
  5. formulaic hierarchy chart

ANS: A

  1. The ovals, which appear at the top and bottom of a flowchart, are called ______.
  2. input symbols
  3. processing symbols
  4. terminal symbols
  5. output symbols

ANS: C

  1. In a flowchart, the ______symbol marks the program’s starting point.
  2. input
  3. output
  4. processing
  5. Start terminal

ANS: D

  1. The ______symbol marks the program’s ending point in a flowchart.
  2. output
  3. processing
  4. End terminal
  5. Input

ANS: C

  1. In a flowchart, ______are used as input symbols and output symbols to represent the steps in which the program reads input or displays output.
  2. Ovals
  3. Rectangles
  4. Parallelograms
  5. Triangles

ANS: C

  1. In a flowchart, rectangles are used as ______to represent the steps in which the program performs some process on data, such as a mathematical calculation.
  2. processing symbols
  3. output symbols
  4. input symbols
  5. terminal symbols

ANS: A

  1. A ______is a mistake that does not prevent the program from running but causes it to produce incorrect results.
  2. syntax error
  3. logic error
  4. parse error
  5. interpret error

ANS: B

  1. The term ______means that the programmer finds and corrects logic errors in the program.
  2. debug
  3. proofread
  4. analyze
  5. logistics

ANS: A

  1. A(n) ______provides all the necessary tools for creating, testing, and debugging software.
  2. super computer
  3. integrated development environment (IDE)
  4. operating system
  5. software development kit (SDK)

ANS: B

  1. ______can be used to create applications not only with Visual C#, but also with other languages such as Visual Basic and C++.
  2. Visual Studio 2012
  3. A compiler
  4. Notepad
  5. All of the above

ANS: A

  1. ______is a free programming environment that is available for download from the Microsoft Web site.
  2. Visual Studio 2012 Express for Windows Desktop
  3. Visual Studio 2012
  4. The MSDN library
  5. Internet Explorer

ANS: A

  1. Each Visual C# application that you create is a called a ______.
  2. solution
  3. file
  4. source
  5. project

ANS: A

  1. The ______window shows the application’s form and allows you to visually design its appearance by placing the desired controls that will appear on the form when the application executes.
  2. Solution Explorer
  3. Properties
  4. Designer
  5. Project

ANS: C

  1. The ______window allows you to navigate among the files in a Visual C# project.
  2. Properties
  3. Designer
  4. Source
  5. Solution Explorer

ANS: D

  1. When you are creating a Visual C# application, you use the ______window to examine and change a control’s properties.
  2. Properties
  3. Solution Explorer
  4. Designer
  5. Attributes

ANS: A

  1. When the ______feature is turned on, the window is displayed only as a tab along one of the edges of the Visual Studio environment.
  2. Auto Hide
  3. Pushpin
  4. Economy View
  5. Tab

ANS: A

  1. The ______contains buttons that execute frequently used commands.
  2. toolbox
  3. hot bar
  4. standard toolbar
  5. command bar

ANS: C

  1. The ______is a window that allows you to select the controls that you want to use in an application’s user interface.
  2. standard toolbar
  3. picker
  4. control library
  5. toolbox

ANS: D

  1. A(n) ______is a small rectangular box that pops up when you hover the mouse pointer over a button on the toolbar or in the toolbox for a few seconds.
  2. Icon
  3. ToolTip
  4. Message
  5. Alert

ANS: B

  1. When a window is ______, it means it is attached to one of the edges of the Visual Studio window.
  2. parked
  3. seated
  4. docked
  5. floating

ANS: C

  1. A window that is not attached to one of the edges of the Visual Studio window is ______.
  2. floating
  3. hovering
  4. overlapped
  5. docked

ANS: A

  1. When you create a new project using Visual Studio, it will be stored in the ______at the location you specify on your computer’s disk.
  2. Solution folder
  3. Project folder
  4. Solution file
  5. System file

ANS: A

  1. Inside the solution folder, the ______contains various files related to the project.
  2. project folder
  3. solution file
  4. source folder
  5. system folder

ANS: A

  1. Inside the solution folder, you can double-click the ______to open the project in Visual Studio.
  2. solution file
  3. system folder
  4. project folder
  5. source file

ANS: A

True or False

  1. Computer can do such a wide variety of things because they can be programmed, which means that computers are designed not to do just one job, but to do any job that their programs tell them to do.

ANS: T

  1. A computer is not a single device but is a system of devices that all work together.

ANS: T

  1. The CPU is the most important component in a computer because without it, the computer could not run software.

ANS: T

  1. In addition to being much larger than the old electromechanical CPUs in early computers, microprocessors are also less powerful.

ANS: F

  1. You can think of secondary storage as the computer’s work area.

ANS: F

  1. RAM is usually a volatile type of memory that is used only for temporary storage while a program is running.

ANS: T

  1. RAM is stored in chips.

ANS: T

  1. Programs are normally stored in main memory and loaded into secondary storage as needed.

ANS: F

  1. The most common type of secondary storage device is the disk drive.

ANS: T

  1. External disk drives can be used to create backup copies of important data or to move data to another computer.

ANS: T

  1. The use of USB drives has declined dramatically in recent years in favor of superior devices such as floppy disk drives.

ANS: F

  1. USB drives, which are also known as memory sticks and flash drives, are inexpensive, reliable, and small enough to be carried in a pocket.

ANS: T

  1. Data is not recorded magnetically on an optical disc but is encoded as a series of pits on the disc surface.

ANS: T

  1. Floppy disk drives are good mediums for creating backup copies of data.

ANS: F

  1. Common input devices are the keyboard, mouse, scanner, microphone, and digital camera.

ANS: T

  1. Common output devices are video displays and printers.

ANS: T

  1. Disk drives and recordable optical disk drives can be considered input devices or output devices.

ANS: T

  1. There are two general categories of software: system software and application software.

ANS: T

  1. Software development tools control the internal operations of the computer’s hardware, mange all the devices connected to the computer, allow data to be saved to and retrieved from the storage devices, and allow other programs to run on the computer.

ANS: F

  1. Examples of utility programs are virus scanners, file-compression programs, and data-backup programs.

ANS: T

  1. An operating system consists of assemblers, compilers, and interpreters.

ANS: F

  1. Some examples of application software are spreadsheet programs, e-mail programs, Web browsers, and game programs.

ANS: T

  1. In order to do anything meaningful, a computer has to have lots of bytes.

ANS: T