Flashcards
CISP 301 Midterm Exam
Cards in this deck (40)
- 1The 3 areas of structured Programming1.Sequence
2.Repetition
3.Selection (loop program) - 2Fetch-Decode-Execute Cycle1. Fetch: Reads Instructions from Memory in CPU
2.Decode: translates instructions
3.Execute: Performs Operation - 3What is a Post-Conditional Control LoopIF-ELSE-THEN
- 4Only use "Call" whenit is a non return function
- 5Name four FunctionsInteger
String
Real
Boolean - 6Local VariablesVariables declared inside the function
(a.k.a. inside int main() ) - 7What is a Global VariableA variable that can be accessed anywhere in a program
(a.k.a any function above int main() - 8GIGOGarbage In
Garbage Out - 9FunctionA group of statements that perform a task/instructions
ex:
function{
statements} - 10Return FunctionReturns a Value
example;
int main () - 11Non-return FunctionWon't return a Value
example:
void main() - 12ModuleModules hold Functions and statements
ex:
Main(){
function(){
statement} } - 13The Order of OperationsOperations that go in a order of left to right
- 14Who developed C Language and UnixKen Thompson developed C language in 1970 along with Unix (operating system)
- 15Math Operators+ addition
- subtraction
* multiplication
/ division
^ exponent
% modulus - 16What does Modulus Operator (%) dodivides 2 numbers and returns the reminder
- 17Sentinal/Sentinal LoopA Value that signals to end the input (cin)
example:
Enter a number (0 to quit): 10
Enter a number (0 to quit): 50
Enter a number (0 to quit): 0
The Sum is 60 - 18Repetition Structureused to repeat lines a certain amount of times or while condition remains true
ex: while
do-while
for - 19Math FunctionsExamples:
min(x,y)
max(x,y)
pow(x,2)
rand(x) - 20What are the 3 most common types of loopswhile
do-while
for-loop - 21What is a pre-test loopThe body of the loop executes 0 or more times
ex:
for-while - 22What is a post-test loopThe body of the loop executes 1 or more times
ex:
do, while
while loop is a pretest loop - 233 Conditions of a Counter Control loop1.Intialization
2. Test
3.Increment
ex: For (Int x = 0; x<=10; x++)
For (int; condition; increment) - 24What is Pre-Fix Notation++x
(a.k.a x+1)
example:
int x=9;
cout<<(++x)< - 25What is Post-Fix Notationx++
(a.k.a x+1)
example:
int x=9;
x++;
cout< - 26What are Pre-Conditional Control Loopswhile loop
or
do-while - 27Decision StructuresCode that will execute provided certain condition/conditions
Example:
IF-THEN-ELSE
Select Statements - 28Boolean OperatorsAND (&&)
OR (II)
NOT (!=) - 29Boolean (bool)True or false Values
- 30intstores any whole number
- 31floatstores number with decimals up to 7 decimal places
- 32doublestores number with decimals up to 15 decimal places
- 33charstores a single character, letter, number, or ASCII
- 34ASCIIAmerican Standard Code for Information Interchange
- 35Parametersvariable inside the function parathesis
example:
void function(parameter1, parameter2) - 36ArgumentsA parameter passed through a function
example:
void function(parameter1, parameter2)
{
function(parameter1, parameter2);
} - 37Passing a Value to a FunctionHaving variable with the same name that don't need to match
example how to use:
void function(int count) - 38Passing Parameters by ReferenceHaving variables with the same name that need to match
example how to use:
void function(int & count) - 39Input Deviceskeyboard, mouse, touchscreen, scanner, microphone, and digital camera. Disk drives and optical
drives - 40Output Devicesvideo displays and printers. Disk drives and CD recorders
Information
- Description
- cisp Computer Studies Flashcards on CISP 301 Midterm Exam, created by Braden Parke on 06/03/2024.
- Created by
- Braden Parke
- Views
- 7
- Rating