Can someone please help with these multiple choice questions
Can someone please help with these multiple choice questions
1)A switch statement should be used ________.
as a single-selection structure as a double-selection structure when a variable may assume many different values which must be tested against to replace all if and if...else statements
2)A computer can directly understand only its own ________.
machine language assembly language high-level language None of these.
3) Assemblers ________.
convert machine language into high-level language convert assembly language into machine language convert high-level language into machine language convert high-level language into assembler language
4) A function prototype does not have to ________.
include parameter names terminate with a semicolon agree with the function definition match with all calls to the function
5) A valid reason for building programs out of functions is ________.
that the divide-and-conquer approach facilitates program construction that pre-existing functions can be used to create new programs the avoidance of code repetition within a program All of these.
6) Arrays and structures are ________
entities in that they remain the same size throughout program execution. dynamic automatic register static
7) A fatal logic error is always caused by ________.
not initializing variables before executing a repetition structure choosing a sentinel value that is also a data value using a counter variable in a calculation after the loop an attempt to divide by zero
8) A bubble sort of 1000 elements requires a maximum of ________ passes.
1001
1000
999
998 ¬¬¬
9) ___ are essentially reusable software components that model items in the real world.
Objects Supersets Modules Developers
10)Each standard library has a corresponding ________.
function ,variable, type, header file, CD-ROM
Solution
1) As a multiple-selection structure when a variable may assume many different values which must be tested against to replace all if and if...else statements
2) machine language
3) convert assembly language into machine language
4) include parameter names
5) All of these
6) static
7) an attempt to divide by zero
8) 999
9) Objects
10) header file

