Computer Science - Object Oriented Programming Using C++

26.
Local variables _____
are created outside a block
are known only to that block
continue to exist when their block ends
are illegal in C++
Answer: Option
Explanation:
No answer description is available. Let's discuss.

27.
# directives must be present
before the main() function
after the main() function
at the end of the program
anywhere in the program body
None of the above
Answer: Option
Explanation:
No answer description is available. Let's discuss.

28.
Programmers prefer to declare almost all variables _____
at the beginning of each function
globally
on one line
with cryptic names
Answer: Option
Explanation:
No answer description is available. Let's discuss.

29.
A(n) _____ is always incremented by a constant amount, whereas a(n) _____ is incremented by an amount that varies
accumulator, counter
counter, accumulator
Answer: Option
Explanation:
No answer description is available. Let's discuss.

30.
The C++ _____ function generates random numbers
generate()
genRand
rand
randGen
srand
Answer: Option
Explanation:
No answer description is available. Let's discuss.