Modern Programming Languages MCQs with Answers
Practice important Modern Programming Languages MCQs with answers and explanations.
Chapter: 40
Q781:
Which programming languages provide implicit declarations?
A. Python
B. FORTRAN
C. C++
D. Java
Correct Answer:
B
Chapter: 40
Q782:
Fill in the blank: ______ determines the range of values and operations for a variable.
A. Value
B. Type
C. Binding
D. Context
Correct Answer:
B
Chapter: 40
Q783:
When does dynamic type binding occur?
A. Compile-time
B. Runtime
C. Load-time
D. Design-time
Correct Answer:
B
Chapter: 40
Q784:
What is an advantage of static storage binding?
A. Supports recursion
B. Flexibility
C. Direct addressing and efficiency
D. Dynamic type checking
Correct Answer:
C
Chapter: 40
Q785:
Which variables are allocated from the runtime stack in execution?
A. Explicit heap dynamic variables
B. Static storage variables
C. Stack-dynamic variables
D. Implicit heap dynamic variables
Correct Answer:
C
Chapter: 40
Q786:
What is a disadvantage of implicit heap-dynamic variables?
A. Efficient type checking
B. Loss of error detection
C. Allows recursion
D. Supports direct addressing
Correct Answer:
B
Chapter: 40
Q787:
In JavaScript, an explicit declaration specifies the ______ of a variable.
A. Data type
B. Memory location
C. Scope
D. Storage binding
Correct Answer:
A
Chapter: 40
Q788:
Fill in the blank: Dynamic type binding provides ______ but makes type error detection difficult.
A. Efficiency
B. Flexibility
C. Reliability
D. Performance
Correct Answer:
B
Chapter: 40
Q789:
What kind of binding occurs when a variable is associated with a memory cell before execution?
A. Stack-dynamic binding
B. Static binding
C. Dynamic type binding
D. Heap-dynamic binding
Correct Answer:
B
Chapter: 40
Q790:
Which of the following allows recursion and conserves storage?
A. Stack-dynamic variables
B. Static storage variables
C. Implicit heap-dynamic variables
D. Explicit heap-dynamic variables
Correct Answer:
A
Chapter: 40
Q791:
Fill in the blank: ______ binding occurs when variables are bound to memory cells during runtime.
A. Static
B. Dynamic
C. Explicit
D. Implicit
Correct Answer:
B
Chapter: 40
Q792:
What is a disadvantage of stack-dynamic variables?
A. Lack of flexibility
B. History-sensitive subprograms
C. Overhead of allocation and deallocation
D. Supports direct addressing
Correct Answer:
C
Chapter: 40
Q793:
In C++, dynamic objects are created using which directive?
A. new and delete
B. malloc and free
C. append and pop
D. get and set
Correct Answer:
A
Chapter: 40
Q794:
Which binding type causes allocation and deallocation to occur with assignment statements?
A. Static binding
B. Stack-dynamic binding
C. Explicit heap dynamic binding
D. Implicit heap dynamic binding
Correct Answer:
D
Chapter: 40
Q795:
Fill in the blank: _______ words cannot be used as user-defined identifiers in programming.
A. Reserved
B. Keywords
C. Contextual
D. Generic
Correct Answer:
A
Chapter: 41
Q796:
What does type checking ensure in a program?
A. Proper syntax
B. Compatible data types
C. Runtime efficiency
D. Memory management
Correct Answer:
B
Chapter: 41
Q797:
A type error occurs when an operator is applied to _______.
A. Valid operands
B. Incompatible operands
C. Compatible types
D. Undefined variables
Correct Answer:
B
Chapter: 41
Q798:
What is the automatic conversion of types by a compiler called?
A. Parsing
B. Coercion
C. Compilation
D. Typing
Correct Answer:
B
Chapter: 41
Q799:
If type bindings are dynamic, type checking must be _______.
A. Static
B. Manual
C. Dynamic
D. Optional
Correct Answer:
C
Chapter: 41
Q800:
Which language is considered strongly typed?
A. Ada
B. C
C. FORTRAN 77
D. Pascal
Correct Answer:
A