Untitled Flashcards Set

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/71

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 9:56 PM on 12/14/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

72 Terms

1
New cards

What is the correct statement to determine if x is between 19 and 99?

x > 19 && x < 99

2
New cards

The braces for a loop define the __________ of the loop.

Function

3
New cards

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

4
New cards

__________ is the decimal number associated with the ASCII character โ€˜0โ€™.

48

5
New cards

A loop that always executes the loop body at least once is known as a __________ loop.

While

6
New cards

The format specifier used to tell printf to expect a double precision floating number is a percent sign followed by the character(s) __________.

f

7
New cards

Each time a loop body executes is known as __________.

iteration

8
New cards

if-else statements that are inside other if-else statements are said to be __________.

nested

9
New cards

When must we use braces to define the body of a conditional expression?

When there is more than one statement

10
New cards

int myValue; is called a __________.

declaration

11
New cards

The format specifier used to tell printf to expect an integer is a percent sign followed by the character(s) __________.

%d

12
New cards

The portion of the printf function call within the double quotes is called the __________.

format string

13
New cards

__________ is the decimal number -42 converted to an 8 bit binary number using 2โ€™s complement notation.

11010110

14
New cards

What is the opposite of ( x < 20 && x > 12)?

(x >= 20 || x <= 12)

15
New cards

Is printf used for input or output?

output

16
New cards

Write the loop condition to continue a while loop as long as x is negative.

while(x < 0)

17
New cards

__________ is the decimal number 42 converted to an 8 bit binary number using 2โ€™s compliment notation.

00101010

18
New cards

A switch statement variable must be an __________.

integer

19
New cards

__________ is a type whose values are defined by a list of constants of type int.

enum

20
New cards

A loop that iterates one too many or one too few times is said to be __________.

off-by-1

21
New cards

A __________ loop always executes the loop body at least once, regardless of the loop condition.

do-while

22
New cards

The code following the __________ case is executed if none of the other cases are matched in a switch statement.

default

23
New cards

Variables defined inside a set of braces are said to be __________ to that block of code.

local

24
New cards

A __________ expression is an expression that can be thought of as being true or false.

Boolean

25
New cards

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

26
New cards

Each repetition of a loop body is called __________.

iteration

27
New cards

A compound statement that contains variable declarations is called a __________.

Block

28
New cards

The compiler always pairs an else with __________.

Closet unmatched if statement

29
New cards

Converting from one type to another is called __________.

type cast

30
New cards

Write the code to convert the value in an integer variable named count to a temporary double.

(double) count

31
New cards

Algorithms are typically described in __________.

Pseudocode

32
New cards

When you want to execute a function in your program, you would make a function __________.

call

33
New cards

The __________ of a variable is where that variable can be used.

scope

34
New cards

In the following function declaration, the variable size is known as a __________. int myFunction ( int size );

formal parameter

35
New cards

Constant variables that might be used in different functions should be __________.

global

36
New cards

The absolute value function abs is located in the __________ library.

stdlib.h

37
New cards

Variables that are declared inside a function are said to be __________ to that function.

local

38
New cards
#include is known as an __________.

Include Directive

39
New cards

A problem-solving approach that starts with the big problem and breaks it down into smaller pieces is called __________.

Top-down design

40
New cards

The __________ describes how the function will work.

function body

41
New cards

The black box analogy demonstrates the concept of __________.

procedural abstraction

42
New cards

What is the output produced by the following code fragment? int i = 3; printf(โ€œ%.2f โ€, sqrt( pow(i,4.0) ) );

9.00

43
New cards

What is the value of (pow(2,sqrt(9.0) + ceil(0.99)))?

16

44
New cards

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

45
New cards

Using functions in a program is called __________.

Procedural abstraction

46
New cards

What is the correct way to call the following function? Void setDisplay( void );

setDisplay();

47
New cards

The items passed to a function are called __________.

arguments

48
New cards

The & operator is called the __________ operator.

address

49
New cards

A __________ is a main program that only checks that functions execute correctly.

driver

50
New cards

If we want to test if a given function works correctly, we would write a __________ to test it.

test case

51
New cards

A __________ is a simplified version of a function used to test the main program.

stub

52
New cards

What type of value does a void function return?

no value

53
New cards

Testing a program with values that are close to values that will change the execution of a program is called __________.

boundary testing

54
New cards

The values or variables listed in the function declaration are called __________ to the function.

parameters

55
New cards

What symbol is used to signify that a parameter is a pointer?

56
New cards

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)

57
New cards

Pre and post conditions for a function should be written (before/after) the function definition is written.

before

58
New cards

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

59
New cards

A function that does not return a value is known as a __________ function.

void

60
New cards

The function used to open a file and return a FILE pointer for that file is __________.

fopen()

61
New cards

When a file fails to open, fopen returns or evaluates as __________.

NULL

62
New cards

The format specifier to display floating point numbers in scientific notation is the percent sign followed by the letter: __________.

e

63
New cards

The format specifier that always shows the decimal point to display floating point numbers is the percent sign followed by the letter: __________.

f

64
New cards

โ€œ\nโ€ is a __________ and โ€˜\nโ€™ is a __________.

c-string, character

65
New cards

Write the format specifier used to change the number of decimal places displayed in a floating point number to 3 decimal places.

%.3f

66
New cards

Which functions read one character even if that character is a blank space?

fgetc, getc, getchar

67
New cards

The format specifier to display floating point numbers in the shortest notation is the percent sign followed by the letter: __________.

g

68
New cards

When you are finished using a file you should close the file using the function __________.

fclose()

69
New cards

__________ is the safe function used to get a restricted length c-string from a file or the keyboard.

fgets

70
New cards

The special character used to mark the end of a C-string is called the __________ character.

NULL terminator

71
New cards

All data is input and output as __________ data.

character

72
New cards

scanf, fscanf, and sscanf return __________.

number of successful scans