CSC 120 Final Exam Questions and
Answers
What is an expression? - ANSWER-Uses relative operands to create a problem
What are the four types of generic modules used for the solutions to most problem? -
ANSWER-Initialize, process, control, wrap up
List the steps to your problem solving Heuristic: - ANSWER-1. Identify the problem
2. Understand the problem
3. List possible solutions
4. Determine the best possible solution
5. List instructions
6. Evaluate the solution
What is a variable? - ANSWER-A data item that CAN change during a process
List the five generic data types: - ANSWER-Numeric: Integer, Real Numbers, Character,
String, and Logical
What are the three types of generic process data modules - ANSWER-Read, Calculate,
and Print
What is the result of (A+B)\C^2, when A=15, B=6, C=2 - ANSWER-5
What is the result of A AND B AND B OR C, when A=TRUE, B=TRUE, C=FALSE -
ANSWER-True
What is the result of Z<5 OR X*Y <=Z AND Z/Y+2<Y, when X=3, Y=7, Z=12 -
ANSWER-False
What is a pass by value parameter? - ANSWER-It's a copy
What type of chart is an overview of the program and shows the interconnections of the
program modules? - ANSWER-A structure chart
What type of chart is a graphical representation of the "algorithm"? - ANSWER-
Flowchart
, What type of chart separates a problem into four categories: the given data, the
required results, the processing required, and the solution alternatives? - ANSWER-The
problem analysis chart
What chart technique describes a program using English-like words? - ANSWER-
Pseudocode
What logical operator has the highest order of operation? - ANSWER-NOT
Setup a logical expression for the following conditions: A retail store has this check-
cashing policy: the costumer must have a driver's license; when the check is for more
than $50.00, the customer must have a check-cashing card on file. - ANSWER-DL
(C<=50 or CCC)
What term describes the functional dependence of two modules? - ANSWER-Coupling
List and describe the two integer mathematical operators. - ANSWER-Integer Division:
Gives Remainder
Modulus: Gives Number of times n can go into the number being squared
When is an OR operation false? - ANSWER-When all operands are false
What are the four pointers to follow that help you develop efficient computer solutions to
problems? - ANSWER-Use modules, use the three logic structures, eliminate
redundancy by using modules, use techniques to improve readability
List two generic string functions presented in the text, give a brief description of each. -
ANSWER-1) Length: The number of characters in the function
2) Mid: The middle characters of the function
When a global and a local variable have the same name which one is used by a
module? - ANSWER-The most local
What needs to be done before you enter a pre-test loop? - ANSWER-Initialization
What is the least number of times a post-test loop could loop? - ANSWER-Once
Identify the four generic modules, exclude object oriented, and include any sub parts
where appropriate - ANSWER-Control Module, Process Modules: (Read/Validate,
Calculate, Print), Initialize Module, Wrap-Up Module
What are the three logic structures for nesting decision statements? - ANSWER-Straight
Through Logic, Positive Logic, and Negative Logic
What is the simplest form of a decision statement? - ANSWER-If (condition), then
Body
Answers
What is an expression? - ANSWER-Uses relative operands to create a problem
What are the four types of generic modules used for the solutions to most problem? -
ANSWER-Initialize, process, control, wrap up
List the steps to your problem solving Heuristic: - ANSWER-1. Identify the problem
2. Understand the problem
3. List possible solutions
4. Determine the best possible solution
5. List instructions
6. Evaluate the solution
What is a variable? - ANSWER-A data item that CAN change during a process
List the five generic data types: - ANSWER-Numeric: Integer, Real Numbers, Character,
String, and Logical
What are the three types of generic process data modules - ANSWER-Read, Calculate,
and Print
What is the result of (A+B)\C^2, when A=15, B=6, C=2 - ANSWER-5
What is the result of A AND B AND B OR C, when A=TRUE, B=TRUE, C=FALSE -
ANSWER-True
What is the result of Z<5 OR X*Y <=Z AND Z/Y+2<Y, when X=3, Y=7, Z=12 -
ANSWER-False
What is a pass by value parameter? - ANSWER-It's a copy
What type of chart is an overview of the program and shows the interconnections of the
program modules? - ANSWER-A structure chart
What type of chart is a graphical representation of the "algorithm"? - ANSWER-
Flowchart
, What type of chart separates a problem into four categories: the given data, the
required results, the processing required, and the solution alternatives? - ANSWER-The
problem analysis chart
What chart technique describes a program using English-like words? - ANSWER-
Pseudocode
What logical operator has the highest order of operation? - ANSWER-NOT
Setup a logical expression for the following conditions: A retail store has this check-
cashing policy: the costumer must have a driver's license; when the check is for more
than $50.00, the customer must have a check-cashing card on file. - ANSWER-DL
(C<=50 or CCC)
What term describes the functional dependence of two modules? - ANSWER-Coupling
List and describe the two integer mathematical operators. - ANSWER-Integer Division:
Gives Remainder
Modulus: Gives Number of times n can go into the number being squared
When is an OR operation false? - ANSWER-When all operands are false
What are the four pointers to follow that help you develop efficient computer solutions to
problems? - ANSWER-Use modules, use the three logic structures, eliminate
redundancy by using modules, use techniques to improve readability
List two generic string functions presented in the text, give a brief description of each. -
ANSWER-1) Length: The number of characters in the function
2) Mid: The middle characters of the function
When a global and a local variable have the same name which one is used by a
module? - ANSWER-The most local
What needs to be done before you enter a pre-test loop? - ANSWER-Initialization
What is the least number of times a post-test loop could loop? - ANSWER-Once
Identify the four generic modules, exclude object oriented, and include any sub parts
where appropriate - ANSWER-Control Module, Process Modules: (Read/Validate,
Calculate, Print), Initialize Module, Wrap-Up Module
What are the three logic structures for nesting decision statements? - ANSWER-Straight
Through Logic, Positive Logic, and Negative Logic
What is the simplest form of a decision statement? - ANSWER-If (condition), then
Body