COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Dynamic type checking slows down the execution
|
|
Dynamic type checking offers more flexibility to the programmers
|
|
In contrast to Static type checking, dynamic type checking may cause failure in runtime due to type errors
|
|
Unlike static type checking, dynamic type checking is done during compilation
|
Detailed explanation-1: -Which of the following comparisons between static and dynamic type checking is incorrect? Explanation: A language is statically-typed if the type of a variable is known at compile time instead of at runtime.
Detailed explanation-2: -It’s useful to think about three kinds of automatic checking that a language can provide: Static checking: the bug is found automatically before the program even runs. Dynamic checking: the bug is found automatically when the code is executed. No checking: the language doesn’t help you find the error at all.
Detailed explanation-3: -Static type checking is performed by a compiler, whereas terminal dynamic type checking is performed when the target program is run. Since a source type system allows us to know statically that type errors will not occur when the target program executes; it eliminates dynamic type checking requirements.
Detailed explanation-4: -Dynamic typing-the type is associated with the value, and checked at run-time. Static typing-type is associated with variable or textual expression, and checked at compile-time.