Fundamental Programming MCQs

100 MCQs  (Page 2 of 10)

Which statement about compiled and interpreted languages is most accurate?
C cannot be interpreted
Every Java program is fully interpreted
Python can never be compiled
'Compiled' and 'interpreted' describe implementations, not languages; the same language can have both kinds of implementation
What is the value of an uninitialized local (automatic) int variable in C++?
Indeterminate (garbage); reading it is undefined behavior
INT_MIN
Always -1
Always 0
What are the scope and lifetime of a static local variable declared inside a C++ function?
Block scope and a lifetime of one function call
Block scope, but a lifetime equal to the whole program run
Global scope and program lifetime
File scope and a lifetime of one function call