1/71
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is the correct statement to determine if x is between 19 and 99?
x > 19 && x < 99
The braces for a loop define the __________ of the loop.
Function
In a compound logical and (&&) expression, the evaluation of the expression stops once one of the terms of the expression is false. This is known as __________ evaluation.
Short-Circuit
__________ is the decimal number associated with the ASCII character โ0โ.
48
A loop that always executes the loop body at least once is known as a __________ loop.
While
The format specifier used to tell printf to expect a double precision floating number is a percent sign followed by the character(s) __________.
f
Each time a loop body executes is known as __________.
iteration
if-else statements that are inside other if-else statements are said to be __________.
nested
When must we use braces to define the body of a conditional expression?
When there is more than one statement
int myValue; is called a __________.
declaration
The format specifier used to tell printf to expect an integer is a percent sign followed by the character(s) __________.
%d
The portion of the printf function call within the double quotes is called the __________.
format string
__________ is the decimal number -42 converted to an 8 bit binary number using 2โs complement notation.
11010110
What is the opposite of ( x < 20 && x > 12)?
(x >= 20 || x <= 12)
Is printf used for input or output?
output
Write the loop condition to continue a while loop as long as x is negative.
while(x < 0)
__________ is the decimal number 42 converted to an 8 bit binary number using 2โs compliment notation.
00101010
A switch statement variable must be an __________.
integer
__________ is a type whose values are defined by a list of constants of type int.
enum
A loop that iterates one too many or one too few times is said to be __________.
off-by-1
A __________ loop always executes the loop body at least once, regardless of the loop condition.
do-while
The code following the __________ case is executed if none of the other cases are matched in a switch statement.
default
Variables defined inside a set of braces are said to be __________ to that block of code.
local
A __________ expression is an expression that can be thought of as being true or false.
Boolean
The format specifier used to tell scanf to expect a double precision floating point number is a percent sign followed by the character(s) __________.
lf
Each repetition of a loop body is called __________.
iteration
A compound statement that contains variable declarations is called a __________.
Block
The compiler always pairs an else with __________.
Closet unmatched if statement
Converting from one type to another is called __________.
type cast
Write the code to convert the value in an integer variable named count to a temporary double.
(double) count
Algorithms are typically described in __________.
Pseudocode
When you want to execute a function in your program, you would make a function __________.
call
The __________ of a variable is where that variable can be used.
scope
In the following function declaration, the variable size is known as a __________. int myFunction ( int size );
formal parameter
Constant variables that might be used in different functions should be __________.
global
The absolute value function abs is located in the __________ library.
stdlib.h
Variables that are declared inside a function are said to be __________ to that function.
local
Include Directive
A problem-solving approach that starts with the big problem and breaks it down into smaller pieces is called __________.
Top-down design
The __________ describes how the function will work.
function body
The black box analogy demonstrates the concept of __________.
procedural abstraction
What is the output produced by the following code fragment? int i = 3; printf(โ%.2f โ, sqrt( pow(i,4.0) ) );
9.00
What is the value of (pow(2,sqrt(9.0) + ceil(0.99)))?
16
When the address of the actual argument is passed to the formal parameter, this allows us to mimic a parameter passing mechanism called __________.
Pass-by-reference
Using functions in a program is called __________.
Procedural abstraction
What is the correct way to call the following function? Void setDisplay( void );
setDisplay();
The items passed to a function are called __________.
arguments
The & operator is called the __________ operator.
address
A __________ is a main program that only checks that functions execute correctly.
driver
If we want to test if a given function works correctly, we would write a __________ to test it.
test case
A __________ is a simplified version of a function used to test the main program.
stub
What type of value does a void function return?
no value
Testing a program with values that are close to values that will change the execution of a program is called __________.
boundary testing
The values or variables listed in the function declaration are called __________ to the function.
parameters
What symbol is used to signify that a parameter is a pointer?
What is the most appropriate way to call the doThings function? Assume that you have two variables named var1 and var2 defined as follows. int var1; float var2;
doThings(var2,var1)
Pre and post conditions for a function should be written (before/after) the function definition is written.
before
Given the following function definition fragment, for which values of myInt should the function be tested? int doSomething(int myInt) { If(myInt < 0) { //do some stuff here { return -1; }
-1, 0, 1
A function that does not return a value is known as a __________ function.
void
The function used to open a file and return a FILE pointer for that file is __________.
fopen()
When a file fails to open, fopen returns or evaluates as __________.
NULL
The format specifier to display floating point numbers in scientific notation is the percent sign followed by the letter: __________.
e
The format specifier that always shows the decimal point to display floating point numbers is the percent sign followed by the letter: __________.
f
โ\nโ is a __________ and โ\nโ is a __________.
c-string, character
Write the format specifier used to change the number of decimal places displayed in a floating point number to 3 decimal places.
%.3f
Which functions read one character even if that character is a blank space?
fgetc, getc, getchar
The format specifier to display floating point numbers in the shortest notation is the percent sign followed by the letter: __________.
g
When you are finished using a file you should close the file using the function __________.
fclose()
__________ is the safe function used to get a restricted length c-string from a file or the keyboard.
fgets
The special character used to mark the end of a C-string is called the __________ character.
NULL terminator
All data is input and output as __________ data.
character
scanf, fscanf, and sscanf return __________.
number of successful scans