CMPSC 200 FINAL EXAM PSU | 364 QUESTIONS AND ANSWERS | 2026 UPDATE | WITH
COMPLETE SOLUTION.
Computer - (ANSWER)a programmable electronic device that can store, retrieve, and process data
input - (ANSWER)data from the user is entered into the computer
Processing - (ANSWER)the computer is instructed what to do you the program, often using information
that was input to the program
Output - (ANSWER)input inputted or processed through the program is output to the user
High-level computer architecture - (ANSWER)the main memory stores programs and program data in
random access memory (RAM)
CPU - (ANSWER)central processing unit
CPU has two main components - (ANSWER)arithmetic and logic unit (ALU) - mathematical operations
control unit - fetches the next instruction, decodes the instruction, and then executes the instruction as
appropriate
Volatile memory - (ANSWER)temporary storage, information is lost when the power to the memory is
lost. typically faster or higher performing than non-volatile memory
ex: RAM, DRAM (dynamic ram)
Non-volatile memory - (ANSWER)permanent storage, information persists even after power is lost.
typically slower than volatile memory
ex: read-only memory (ROM), compact discs (CD), magnetic tape
Program - (ANSWER)a set of instructions to perform specific tasks
Algorithm - (ANSWER)a set step for "doing something"
,CMPSC 200 FINAL EXAM PSU | 364 QUESTIONS AND ANSWERS | 2026 UPDATE | WITH
COMPLETE SOLUTION.
Operating systems - (ANSWER)allocated computer resources and allows communication between the
user and the computer
High-level languages - (ANSWER)easy for humans to understand, but too difficult for a computer to
understand
Low-level languages - (ANSWER)harder for humans to understand, but easier for a computer to convert
to usable instructions
Machine language - (ANSWER)generally quite difficult for humans to understand, the binary digits that
contain instructions that can be understood by the computer
Compiled - (ANSWER)code written by the programmer is reduced to a set of machine-specific
instructions prior to runtime. these instructions are saved as executable files, which can be run
MATLAB stands for - (ANSWER)Matrix laboratory
Three phases of program writing - (ANSWER)Analyze, implement, maintain the code
Analyze - (ANSWER)- specify what the program needs to do
- develop the algorithm(s) to solve your problem
- verify that what you have will work
Implement - (ANSWER)- code the program
- test the program
Maintain the code - (ANSWER)for large or long-term software systems, this can be the most expensive
part
,CMPSC 200 FINAL EXAM PSU | 364 QUESTIONS AND ANSWERS | 2026 UPDATE | WITH
COMPLETE SOLUTION.
Constant - (ANSWER)a variable whose value is not intended to change
Create script - (ANSWER)- where we are going to store commands
- they do not execute they are simply stored
- working in a script allows you to save your work
clc - (ANSWER)clear the command window
clear - (ANSWER)delete all the variables from the workspace
To delete specific variables type - (ANSWER)clear(variable)
Block comment - (ANSWER)%{..........%}
- must put writing on the next line from the first percent
By doing .* it gives you - (ANSWER)an element by element operation
A variable can - (ANSWER)contain multiple pieces of information
abs(data#) - (ANSWER)absolute value
sqrt(#) - (ANSWER)square root
nthroot(#,#) - (ANSWER)nth root (x,n)
sign(#) - (ANSWER)signum function
- if the input is positive MATLAB will return the number +1
, CMPSC 200 FINAL EXAM PSU | 364 QUESTIONS AND ANSWERS | 2026 UPDATE | WITH
COMPLETE SOLUTION.
- if the input is negative MATLAB will return the number -1
- if the input is zero MATLAB will return the number 0
rem(x,y) - (ANSWER)remainder of x divided by y
exp(x) - (ANSWER)e^x
log - (ANSWER)natural log
X = round(#) - (ANSWER)round to the nearest integer
X = fix(#) - (ANSWER)truncation function
- chops off the decimal place
X = floor(#) - (ANSWER)round in the direction of the nearest integer towards negative infinity
X = ceil(x) - (ANSWER)round in the direction of the nearest integer towards positive infinity
X = factor(#) - (ANSWER)to get prime factors
X = gcd(#,#) - (ANSWER)to get greatest common denominator
X = lcm(#,#) - (ANSWER)to get least common multiple
X = primes(#) - (ANSWER)to get all prime factors up to the number
X = isprime(#) - (ANSWER)is the number prime
COMPLETE SOLUTION.
Computer - (ANSWER)a programmable electronic device that can store, retrieve, and process data
input - (ANSWER)data from the user is entered into the computer
Processing - (ANSWER)the computer is instructed what to do you the program, often using information
that was input to the program
Output - (ANSWER)input inputted or processed through the program is output to the user
High-level computer architecture - (ANSWER)the main memory stores programs and program data in
random access memory (RAM)
CPU - (ANSWER)central processing unit
CPU has two main components - (ANSWER)arithmetic and logic unit (ALU) - mathematical operations
control unit - fetches the next instruction, decodes the instruction, and then executes the instruction as
appropriate
Volatile memory - (ANSWER)temporary storage, information is lost when the power to the memory is
lost. typically faster or higher performing than non-volatile memory
ex: RAM, DRAM (dynamic ram)
Non-volatile memory - (ANSWER)permanent storage, information persists even after power is lost.
typically slower than volatile memory
ex: read-only memory (ROM), compact discs (CD), magnetic tape
Program - (ANSWER)a set of instructions to perform specific tasks
Algorithm - (ANSWER)a set step for "doing something"
,CMPSC 200 FINAL EXAM PSU | 364 QUESTIONS AND ANSWERS | 2026 UPDATE | WITH
COMPLETE SOLUTION.
Operating systems - (ANSWER)allocated computer resources and allows communication between the
user and the computer
High-level languages - (ANSWER)easy for humans to understand, but too difficult for a computer to
understand
Low-level languages - (ANSWER)harder for humans to understand, but easier for a computer to convert
to usable instructions
Machine language - (ANSWER)generally quite difficult for humans to understand, the binary digits that
contain instructions that can be understood by the computer
Compiled - (ANSWER)code written by the programmer is reduced to a set of machine-specific
instructions prior to runtime. these instructions are saved as executable files, which can be run
MATLAB stands for - (ANSWER)Matrix laboratory
Three phases of program writing - (ANSWER)Analyze, implement, maintain the code
Analyze - (ANSWER)- specify what the program needs to do
- develop the algorithm(s) to solve your problem
- verify that what you have will work
Implement - (ANSWER)- code the program
- test the program
Maintain the code - (ANSWER)for large or long-term software systems, this can be the most expensive
part
,CMPSC 200 FINAL EXAM PSU | 364 QUESTIONS AND ANSWERS | 2026 UPDATE | WITH
COMPLETE SOLUTION.
Constant - (ANSWER)a variable whose value is not intended to change
Create script - (ANSWER)- where we are going to store commands
- they do not execute they are simply stored
- working in a script allows you to save your work
clc - (ANSWER)clear the command window
clear - (ANSWER)delete all the variables from the workspace
To delete specific variables type - (ANSWER)clear(variable)
Block comment - (ANSWER)%{..........%}
- must put writing on the next line from the first percent
By doing .* it gives you - (ANSWER)an element by element operation
A variable can - (ANSWER)contain multiple pieces of information
abs(data#) - (ANSWER)absolute value
sqrt(#) - (ANSWER)square root
nthroot(#,#) - (ANSWER)nth root (x,n)
sign(#) - (ANSWER)signum function
- if the input is positive MATLAB will return the number +1
, CMPSC 200 FINAL EXAM PSU | 364 QUESTIONS AND ANSWERS | 2026 UPDATE | WITH
COMPLETE SOLUTION.
- if the input is negative MATLAB will return the number -1
- if the input is zero MATLAB will return the number 0
rem(x,y) - (ANSWER)remainder of x divided by y
exp(x) - (ANSWER)e^x
log - (ANSWER)natural log
X = round(#) - (ANSWER)round to the nearest integer
X = fix(#) - (ANSWER)truncation function
- chops off the decimal place
X = floor(#) - (ANSWER)round in the direction of the nearest integer towards negative infinity
X = ceil(x) - (ANSWER)round in the direction of the nearest integer towards positive infinity
X = factor(#) - (ANSWER)to get prime factors
X = gcd(#,#) - (ANSWER)to get greatest common denominator
X = lcm(#,#) - (ANSWER)to get least common multiple
X = primes(#) - (ANSWER)to get all prime factors up to the number
X = isprime(#) - (ANSWER)is the number prime