Computer Programming Exam 1-Questions and Answers
Computer Programming Exam 1-Questions and Answers 1. ___________ are used to translate each source code instruction into the appropriate machine language instruction. - ANSWER-Compilers 2. 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 named storage location in the computer's memory use for holding a piece of information D) A variable is a word that has a special meaning to the compiler E) A variable is a "line" of code in the body of a program, which may change - ANSWER-A variable is a named storage location in the computer's 3. A variable declaration announces the name of a variable that will be used in a program as well as: - ANSWER-The type of data it will be used to hold 4. This step will uncover any syntax errors in your program. - ANSWER-Compiling 5. The statements written by the programmers are called: - ANSWER-Source Code 6. Three primary activities of a program are: - ANSWER-Input, Processing and Output 7. This is a set of rules that must be followed when constructing a program. - ANSWER-Syntax 8. 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> - ANSWER-E) #Include <iostream> 9. 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 (RAM) - ANSWER-A) Preprocessor
Written for
- Institution
- Computer programming
- Course
- Computer programming
Document information
- Uploaded on
- March 27, 2024
- Number of pages
- 4
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
- compilers
- output stream
- preprocessor directive
-
computer programming exam 1 questions and answers
-
major components of a computer system
Also available in package deal