INTRODUCTION TO COMPILER DESIGN
OVERVIEW OF COMPILERS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Which of the following comparisons between static and dynamic type checking is incorrect?
|
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
|
Explanation:
Detailed explanation-1: -The key difference between the two is that with static type checking, the type of variable is known at compile time (it checks the type of variable before running) while with dynamic type checking, the type of variable is known at runtime (it checks the type of variable while executing).
Detailed explanation-2: -Static checking means that type errors are reported based on a program’s text (source code). Dynamic checking means that type errors are reported based on a program’s dynamic (run-time) behavior.
There is 1 question to complete.