1/65
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
The linker creates____
an executable image
What is bandwidth?
information carrying capacity
____ involves reworking programs to make them clearer and easier to maintain while preserving their correctness and functionality.
Refactoring
Which of the following statements is true?
Compilers translate high-level language programs into machine language programs
Which of the following is going to be the key programming methodology for the next decade?
object-oriented programming
Which of the following would not be considered hardware?
an operating system
Which of the following languages was an ancestor of C?
B
A ____ is an electronic collection of data that’s organized for easy access and manipulation.
database
______ models software in terms similar to those that people use to describe real-world object
Object-oriented design
Programs or data not actively being used by the other units are placed on the ____
secondary storage unit
A computer can directly understand only its own ____
machine language
Which of the following is not an advantage of object-oriented programming?
None of the above—these area all advantages of object-oriented programming
Assemblers
Convert assembly language into machine language
Which of the following statements is false?
Windows is an open-source operating system
Which of the following is not one of the three general types of computer languages
Spoken languages
____ are essentially reusable software components that model items in the real world
objects
Which operation will find the remainder when 15 is divided by 6"?
15 % 6
Which statement is false?
In the statement:
sum = integer1 + integer2
The spaces around each of the binary operators in the statement of part a) are required.
Which of the following multiple word variable names doesn’t conform to the good programming practices in the text?
multiplewordvariablename
Which statement is false?
The equals sign (=) isn’t an operator
Evaluate the expression
3 × 4 % 6 + 4 × 5
20
Which of the following isn’t a valid escape sequence?
\~
The_______sign is also known as the________operator
= , assignment
Which of the following is false?
In a printf statement, the comma that separates the format con-trol string from the expressions to be printed is placed inside the format control string
In a printf, a backslash is printed by enclosing in quotes
\ \
Which of the following statements should be used in secure C programming to display the string “Welcome
not followed by a new-line character?
printf( “%s”, “Welcome”);
In the line
int main()
the parentheses that main is a program building block called a
function
Which of the following is an invalid identifier (variable name)?
5test
Which of the following statements about the inclusion of <stdio.h> is false?
It’s required
Which expression is true?
The expression y = a x x + b * x + c does exponentiation without an exponentiation operator.
Which statement prints “hi” on the screen?
puts("hi");
Which statement is false?
The statements in an if statement must be indented.
The two key attributes of an algorithm are:
actions and order of actions
Counter-controlled iteration is often called __________ iteration because the number of iterations is known before the loop begins executing.
definite
Which of the following encompasses the other three?
control structure
Which of the following will generate an error?
puts(answer == 7 ? "correct" : "incorrect");
Which is not a C iteration statement?
do…for
The __________ is called a multiple selection statement.
switch
Which statement is true about the contents of a correct diamond symbol in a correct flowchart.
It must contain a condition or expression that can be either true or false.
Which statement is false?
The if selection statement can have only one statement in its body.
Which of the following statements is true about undefined behavior, which can leave a system open to attack?
Adding two integers can result in arithmetic overflow, which can cause undefined behavior.
A correct decision symbol has __________ flowlines emerging from it.
2
Which statement is true?
The sequence structure is essentially built into C.
Specifying the order in which statements are to be executed in a computer program is called
program control
Which statement is false?
A carefully prepared pseudocode program is only a beginning; it still takes a tremendous amount of work to convert a pseudocode program into a C program.
The empty statement is represented by placing __________ where a statement would normally be.
;
The diamond flowcharting symbol is also called the __________ symbol.
decision
Which of the following statements correctly prints “Passed” if the student’s grade is greater than or equal to 60 and “Failed” if the student’s grade is less than 60? [The quotes, of course, should not print.]
printf("%s\n", grade >= 60 ? "Passed" : "Failed");
Consider the following code, assuming that x is an integer variable with an initial value of 12:
if (x = 6) {
printf("%i", x);
}
What is the output?
6
An example of a unary operator is
an increment operator
Which statement about a correct for statement with an initialization expression, a loop-continuation test, an increment expression and a loop body is false?
The initialization is performed each time through the loop.
Which is not an iteration statement?
continue
What is produced by a for statement with a correct body and with the following header
for (i = 20; i >= 2; i += 2)
an infinite loop
Which statement is false?
In counter-controlled iteration, the control variable is always incremented by 1 each time the group of instructions is performed.
Which of the following is not specified by the following code segment:
for (c = 1; c <= 10; c++)
body statement of the loop
Which statement is false?
Comma operators evaluate lists of expressions from right to left.
Which statement is false?
Assignments in C produce a value, namely the value that the left-hand side of the assignment had prior to the assignment.
Which statement is true?
The loop body of a correct do … while iteration statement is always executed at least once.
The comma operator is most often used in __________ statements.
for
Which of the following is false?
a continue statement can never appear in the else part of an if statement.
Which statement regarding the switch statement is false?
The default case is required.
In C, the condition 4 > y > 1
does not evaluate correctly and should be replaced by (4 > y && y > 1)
Which of the following is an incorrect expression to increment c by 1 in the increment expression of a for “header?”
c + 1 = c
Which statement is true?
In the “Rules for Forming Structured Programs (and Structured Flowcharts),” the rule that states, “Any rectangle (action) can be replaced by any control statement” is called the “nesting rule.”