Where can you not declare a variable in a C++ program?
a. Within the parameter list of a function definition
b. Within the block of a void function.
c. Within the argument list of a function call
d. Within a block nested within another block
e. Within the block of a value returning function.
c)
Explanation: All except c) allow variable declarations. a) Variables defined in a parameter list would be parameters for the function, b) d) and e) would define local variables.
You might also like to view...
Answer the following statement(s) true (T) or false (F)
If damage occurs to the floor, walls, ceilings, or furniture on your computer forensics lab, it does not need to be repaired immediately.
Microsoft has recently introduced an optional file system, called a Resilient File System, for handling files with very large data sets.
Answer the following statement true (T) or false (F)
?A _____ presents related information in rows and columns, and is especially useful when comparing types of data or listing topics and details.
A. ?graph B. ?table C. ?chart D. ?map
If a program compiles fine, but it produces incorrect result, then the program suffers __________.
a. a compilation error b. a runtime error c. a logic error