Register Now

Login

Lost Password

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

Login

Register Now

Welcome to All Test Answers

Chapter 01 Starting out with C++ Introduction to Computers and Programming


 

Download  file with the answers

Not a member!
Create a FREE account here to get access and download this file with answers


 

Chapter One

MULTIPLE CHOICE

1. What does the term hardware refer to?
a. The relative difficulty of programming
b. The physical components that a computer is made of
c. The way a computer’s storage space is organized
d. The logical flow of instructions
e. None of the above.

 

2. At the heart of a computer is its central processing unit. The CPU’s job is:
a. To fetch instructions
b. To carry out the operations commanded by the instructions
c. To produce some outcome or resultant information
d. All of the above
e. None of the above

 

3. Which of the following best describes an operator?
a. An operator is a rule that must be followed when constructing a program.
b. An operator allows you to perform operations on one or more pieces of data.
c. An operator marks the beginning or ending of a statement, or is used to separate items in a list.
d. An operator is a word that has a special meaning.
e. An operator is a symbolic name that refers to a variable.

 

4. An Integrated Development Environment typically consists of:
a. A text editor
b. A compiler
c. A debugger
d. All of the above
e. None of the above

 

5. The purpose of a memory address is:
a. To identify the location of a byte in memory
b. To prevent multitasking
c. To obtain an algorithm
d. To improve the effectiveness of high-level languages
e. None of the above

 

6. The programming process consists of several steps, which include:
a. Input, Processing, and Output
b. Key Words, Operators, and Punctuation
c. Design, Creation, Testing, and Debugging
d. Syntax, Logic, and Error Handling
e. None of the above

 

7. Programmer-defined names of memory locations that may hold data are:
a. Operators
b. Variables
c. Syntax
d. Operands
e. None of the above.

 

8. Characters or symbols that perform operations on one or more operands are:
a. Syntax
b. Op codes
c. Operators
d. Program ops
e. None of the above

 

9. The computer’s main memory is commonly known as:
a. The hard disk
b. The floppy disk
c. RAM
d. Secondary storage
e. None of the above

 

10. The ________ decodes an instruction and generates electrical signals.
a. Arithmetic and Logic Unit
b. Main memory
c. BIOS
d. Control Unit
e. None of the above

 

11. A(n) ____________ is a set of instructions that the computer follows to solve a problem.
a. Compiler
b. Linker
c. Program
d. Operator
e. None of the above

 

12. _______________ are used to translate each source code instruction into the appropriate machine language instruction.
a. Modules
b. Library routines
c. Compilers
d. Preprocessor directives
e. None of the above

 

13. During which stage does the central processing unit retrieve from main memory the next instruction in the sequence of program instructions?
a. fetch
b. decode
c. execute
d. portability stage

 

14. What statement best describes a variable and its primary purpose?
a. A variable is a structured, general-purpose language designed primarily for teaching programming.
b. A variable is a collection of eight bits.
c. A variable is a word that has a special meaning to the compiler.
d. A variable is a named storage location in the computer’s memory used for holding a piece of information.
e. A variable is a “line” of code in the body of a program, that may change.

 

15. This step will uncover any syntax errors in your program.
a. Editing
b. Compiling
c. Linking
d. Executing
e. None of these

 

16. This term refers to the programmer reading the program from the beginning and steping through each statement.
a. Pseudocoding
b. Software Engineering
c. Desk Checking
d. Spot Checking
e. None of the above

 

17. This is used in a program to mark the beginning or ending of a statement, or separate items in a list.
a. Separators
b. Punctuation
c. Operators
d. Key Words
e. None of the above

 

18. A set of well-defined steps for performing a task or solving a problem is known as a(n):
a. Hierarchy
b. Algorithm
c. Central Processing Unit
d. Encoded instruction
e. None of the above

 

19. The statements written by the programmer are called:
a. Syntax
b. Object code
c. Source code
d. Runtime libraries
e. None of the above

 

20. Internally, the CPU consists of two parts:
a. The Output Device and the Input Device
b. The Software and the Hardware
c. The Control Unit and the Arithmetic and Logic Unit
d. The Single-task Device and the Multi-task Device
e. None of the above

 

21. Even when there is no power to the computer, data can be held in:
a. Secondary storage
b. The Input Device
c. The Output Device
d. The Algorithm
e. None of the above

 

22. Words that have a special meaning and may be used only for their intended purpose are known as:
a. Operators
b. Programmer Defined Words
c. Key Words
d. Syntax
e. None of the above

 

23. The name for a memory location that may hold data is:
a. Key Word
b. Syntax
c. Operator
d. Variable
e. None of the above

 

24. This is a complete instruction that causes the computer to perform some action.
a. Line
b. Statement
c. Variable
d. Key Word
e. None of the above

 

25. A variable declaration announces the name of a variable that will be used in a program, as well as:
a. The type of data it will be used to hold
b. The operators that will be used on it
c. The number of times it will be used in the program
d. The area of the code in which it will be used
e. None of the above

 

26. Three primary activities of a program are:
a. Variables, Operators, and Key Words
b. Lines, Statements, and Punctuation
c. Input, Processing, and Output
d. Integer, Floating-point and Character
e. None of the above

 

27. An example of a secondary storage device is:
a. The computer’s main memory
b. The keyboard
c. The monitor
d. A hard disk
e. None of the above

 

28. During which stage does the central processing unit analyze the instruction and encode it in the form of a number, and then generate an electronic signal?
a. fetch
b. decode
c. execute
d. portability stage

 

29. Mistakes that cause a running program to produce incorrect results are called:
a. Syntax errors
b. Logic errors
c. Compiler errors
d. Linker errors
e. None of the above

 

30. Computer programs are also known as
a. hardware
b. firmware
c. software
d. silverware
e. None of the above

 

31. Unix and Windows 2000 are examples of _______________ operating systems.
a. single tasking
b. multi-tasking
c. Macintosh
d. command-driven
e. None of these

 

32. This is a volatile type of memory, used for temporary storage.
a. A floppy disk
b. ALU
c. RAM
d. A hard disk
e. None of the above

 

33. This is a set of rules that must be followed when constructing a program.
a. Syntax
b. Punctuation
c. Portability
d. Operators
e. Key words

 

34. Which of the following is a preprocessor directive?
a. pay = hours * rate;
b. cin >> rate;
c. // This program calculates the user’s pay.
d. int main()
e. #include

 

35. The programmer usually enters source code into a computer using:
a. Pseudocode
b. A text editor
c. A hierarchy chart
d. A compiler
e. None of the above

 

36. In a broad sense, the two primary categories of programming languages are:
a. Mainframe and PC
b. Single-tasking and Multi-tasking
c. Low-level and High-level
d. COBOL and BASIC
e. None of the above

 

37. Which of the following is not one of the five major components of a computer system?
a. Preprocessor
b. The CPU (central processing unit)
c. Main memory
d. Input/Output device
e. Secondary storage device

 

38. In the process of translating a source file into an executable file, which of the following is the correct sequence?
a. Source code, preprocessor, modified source code, linker, object code, compiler, executable code.
b. Preprocessor, source code, compiler, executable code, linker, modified source code, object code.
c. Source code, compiler, modified source code, preprocessor, object code, linker, executable code.
d. Source code, preprocessor, modified source code, compiler, object code, linker, executable code.
e. Source code, linker, object code, compiler, modified source code, preprocessor, executable code.

 

TRUE/FALSE

1. Software engineering is a field that encompasses designing, writing, testing, debugging, documenting, modifying, and maintaining computer programs.

2. Pseudocode is a form of program statement that will always evaluate to “false.”

3. In programming, the terms “line” and “statement” always mean the same thing.

4. In C++, key words are written in all lowercase letters.

5. The preprocessor executes after the compiler.

6. Machine language is an example of a high-level language.

7. A CPU really only understands instructions that are written in machine language.

About

Leave a reply

Captcha Click on image to update the captcha .

error: Content is protected !!