Questions
Which of the following is not a control statement?
- SELECT CASE
- single-alternative block IF
- double-alternative block IF
- END
Which of the following is the correct order of the categories of computers from the largest to the smallest?
- Supercomputer, microcomputer, mainframe, minicomputer
- Mainframe, minicomputer, supercomputer, microcomputer
- Supercomputer, mainframe, minicomputer, microcomputer
- Mainframe, supercomputer, minicomputer, microcomputer
_______ statement(s) allow the programmer to change the flow of program execution.
- Inquiry-and-response
- Print
- Control
- Flowcharting
The last statement in a block IF is always _______.
- END
- END BLOCK
- ELSEIF
- END IF
What occurs if the first statement after a block IF statement is non-executable such as a REM statement?
- An error message is displayed.
- The program will execute the statement immediately before the block IF statement.
- The block IF statement is executed again.
- The first statement following the non-executable statement is executed.
A _______ always contains an ELSE clause.
- single-alternative block IF
- double-alternative block IF
- SELECT CASE
- menu
A _______ displays a list of program functions from which the user can choose one.
- collating sequence
- boolean operator
- menu
- relational operator
In a double-alternative block IF statement, _______.
- Both THEN and ELSE clauses may be executed
- ELSE clause is always executed
- Either THEN or ELSE clause will be executed
- THEN clause is always executed
Which of the following is an invalid example of a numeric constant?
- 14.85
- 98
- – 1890
- $75
The block IF statement uses relational operators to compare _______.
- constants, variables, and arithmetic expressions
- relational symbols and characters only
- constants and relational operators
- characters and arithmetic expressions only
Which of the following is an invalid character string constant?
- “It is a gift to be simple”
- ‘Every day with you”
- “There was an old lady who”
- “Everybody likes computers”
What happens when a string variable is compared to a numeric variable?
- The variables are compared character by character until one of the values is different.
- The variables are ignored.
- An error will occur.
- The second variable is automatically changed to the data type of the first variable.
The _______ statement can be used to clear the output screen of any garbage before displaying program output.
- NEW
- ERASE
- CLS
- PRINT
The number + 10,345.8 is an invalid numeric constant because it _______.
- contains a comma
- contains a plus sign
- has a decimal point
- is too large
Which of the following is an invalid numeric variable name?
- Nme$
- Sum.Total
- Number
- Largest
The statement LET Print = X + Y + Z is invalid because _______.
- the variable Print must be a string variable
- the variables X, Y, and Z must end with a percent (%) sign
- print is a keyword
- the word LET must be eliminated
Which of the following is an invalid numeric variable name?
- NumPeople
- Num.People
- Num_People
- NUMPEOPLE
Variable names must begin with a _______.
- special symbol or letter of the alphabet
- letter of the alphabet
- number or letter of the alphabet
- special symbol
Which of the following is a valid string variable name?
- St
- Nme%
- Address$
- Zip Code$
_______ can be used to control the order in which arithmetic operations will be performed.
- Periods
- Quotation marks
- Parentheses
- REM statements
A literal can consist of _______.
- only numbers
- only letters of the alphabet
- any combination of numbers, letters, and/or special characters
- only special characters such as &
When the condition evaluates as true in a block IF statement, which part of the statement is executed?
- None; the statement is skipped.
- The THEN part of the statement is executed.
- The ELSE part of the statement is executed.
- Both the THEN and the ELSE parts of the statement are executed.
Which statement best describes this LET statement?
LET Sum = N1 + N2 + N3
- '*** Print the sum of the 3 numbers. ***
- '*** Find the product of the 3 numbers. ***
- '*** Copy the value of N1 to sum. ***
- '*** Find the sum of the 3 numbers. ***