Programming Revision Questions "Mid-Term":
Multiple Choice
1. A(n) __________ is a list of instructions detailing the steps needed to perform a task.
a) program
b) punch card
c) agenda
d) plan
Answer: A
Response: A program is a list of instructions for the computer to follow to accomplish the
task of processing data into information.
2. The actual coding of a program is done by a(n)
a) systems analyst
b) software engineer
c) end-user
d) database administrator
Answer: B
Response: Software engineers would complete the coding of a program.
3. The information software produces after it has processed the input is called
a) flowchart
b) output
c) objective
d) prototype
Answer: B
Response: The output is what has been produced after the input has been processed.
4. The information that a program requires in order to accomplish its objective is called the
a) data
b) contribution
c) effort
d) input
Answer: D
Response: Once you know the output, you then determine the input data and the source of
this data
Introduction To Programming 1st Term 2017/2018
5. In the course of creating program specifications, the end-user should sketch out the
desired
a) input
b) output
c) splash logo
d) icon
Answer: B
Response: The end-users should sketch out the desired output that they want out of the
computer system.
6. The actual writing of a program in a programming language is called
a) program design
b) logic structure
c) language translation
d) coding
Answer: D
Response: Writing the program is called coding.
7. Eliminating errors in a program is also called ______ the program.
a) debugging
b) modularizing
c) coding
d) clarifying
Answer: A
Response: Debugging is testing a program and eliminating errors.
8. A compiler performs the following function.
a) translates and executes each program statement one at a time
b) converts the source code into machine language code
c) translates instruction codes from assembler language into machine language
d) uses statements to tell objects to perform actions on themselves
Answer: B
Response: Compiler converts procedural language program (source code) into a machine
language code (object code).
9. An interpreter performs the following function.
a) translates and executes each line of code one at a time
b) translates high-level language statements
c) uses statements to tell objects to perform actions on themselves
d) translates software code from assembly language into machine language
Introduction To Programming 1st Term 2017/2018
Answer: A
Response: Interpreter converts the procedural language one statement at a time into
machine code just before it is executed.
10. In Java the direct link to ADT by implementing them as a:
a) Method.
b) Class.
c) Object.
d) Attributes.
Answer: B
11. What is javac?
a) It produces the java byte code from *.java file.
b) It is the intermediate representation of your source code that contains
instructions.
c) Both a and b.
d) None of the above.
Answer: C
12. In object-oriented programming, an object
a) Is a class.
b) May contain data and methods.
c) Is a program.
d) May contain classes.
Answer: B
True/False
1. A program is a list of instructions detailing the steps required to perform a task.
Answer: True
Response: A program is a list of instructions for the computer to follow to accomplish the
task of processing data into information.
2. In the program specification step, the objectives, outputs, inputs, and processing
requirements are determined.
Introduction To Programming 1st Term 2017/2018
Answer: True
Response: The program specification step includes all of these variables.
3. You should determine the input for a program before determining its output.
Answer: False
Response: You should determine the output requirements before defining the input.
4. During the program specification phase, you plan and document a solution.
Answer: False
Response: Ongoing documentation is required through the process.
5. Writing the program is called coding.
Answer: True
Response: Writing a program is called coding.
6. The best way to write good programs is to create unstructured programs.
Answer: False
Response: The best way to code effective programs is to write structured programs.
7. “Debugging” refers to the process of eliminating syntax and logic errors.
Answer: True
Response: Debugging refers to the process of testing and then eliminating errors.
8. Program documentation is intended only for end-users.
Answer: False
Response: Program documentation is intended for users, operators, and programmers.
9. Program maintenance involves ensuring that current programs are operating error- free,
efficiently, and effectively.
Answer: True
Response: Program maintenance includes all of these aspects.
10. Correcting operational errors is only one facet of program maintenance.
Answer: True
Response: Program maintenance involves correcting operational errors, and adjusting
programs to meet changing needs.
Introduction To Programming 1st Term 2017/2018
11. When a program is translated to machine code, the compiler will typically find logic
errors.
Answer: False
Response: Compilers convert the procedural language program into machine language
code.
12. An application generator converts source code to object code.
Answer: False
Response: A compiler converts the programmer’s procedural language program (source
code) into a machine language code (object code).
13. Interpreted code does not need to be compiled.
Answer: True
Response: Interpreter converts procedural language one statement at a time into machine
code just before it is to be executed. No need to be compiled.
14. The data types short and double are included in Java's eight primitive data types.
Answer: True
________________________________________________________________________
End of Question
Introduction To Programming 1st Term 2017/2018