Computer Science Quiz 1
Which 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 <iostream>
E) #include <iostream>
Which Which of the following is not one of the five major components of a computer system? A) Preprocessor B)CPU C) Main memory D) Input/Output devices E)Secondary storage device
A) Preprocessor
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
A) The type of data it will be used to hold
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
A) To identify the location of a byte in memory
A set of well-defined steps for performing a task or solving a problem is known as a(n): A) Hierarchy B) Algorithm C) CPU D) Encoded Instruction E) None of the above
B) Algorithm
This step will uncover any syntax error in the program A) Editing B) Compiling C) Linking D) Executing E) None of the above
B) Compiling
Mistakes that cause a running program to produce incorrect results are called A) Syntax error B) Logical error C) compiler errors D) Link error E) None of the above
B) Logical error
Unix and Windows 2000 are examples of _______________ operating systems. A) Single tasking B) Multi tasking C) Macintosh D) Command-driven E) None of the above
B) Multi tasking
This is a complete instruction that causes the computer to perform some action. A) Line B) Statement C) Variable D) Keyword E) None of the above
B) Statement
Progr Programmer-defined names of memory locations that may hold data are: A) Operators B) Variables C) Syntax D) Operands E) None of the above
B) Variables
The ________ decodes an instruction and generates electrical signals A) ALU B) Main memory C) Control unit D) BIOS E) None of the above
C) Control unit
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
C) Design, Creation, Testing, and Debugging
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
C) Key words
In a br 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
C) Low-level and High-level
The c 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
C) RAM
The statements written by the programmer are called A) Syntax B) Object code C) Source code D) Runtime Library E) None of the above
C) Source code
An In 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
D) All of the above
At the 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
D) All of the above
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.
D) Source code, preprocessor, modified source code, compiler, object code, linker, executable code.
An ex An example of a secondary storage device is: A) The computer's main memory B) The keyboard C) The monitor D)A hard drive E) None of the above
D)A hard drive