Typing Disciplines & ADTs MCQs

6 MCQs  — Data Types MCQs

Practice Typing Disciplines & ADTs MCQs with correct answers and explanations. These questions are from the Data Types MCQs section.

Which description of JavaScript's typing is correct?
Dynamically and strongly typed
Statically and weakly typed
Statically and strongly typed
Dynamically and weakly typed
In JavaScript, what are typeof null and typeof NaN?
"object" and "undefined"
"undefined" and "number"
"null" and "NaN"
"object" and "number"
Which pairing of abstract data type and access order is correct?
Both are FIFO
Stack: LIFO; Queue: FIFO
Both are LIFO
Stack: FIFO; Queue: LIFO
What is the average-case and worst-case lookup time of a hash table?
O(log n) in both cases
Average O(1); worst O(n)
O(1) in both cases
Average O(n); worst O(1)
Which statement best defines an Abstract Data Type (ADT)?
A data type built into the hardware
A class with only private members
A data type that cannot be instantiated
A type defined by its operations and behavior, independent of how it is implemented