recategorized by
3,995 views
3 votes
3 votes

Which of the following comparisons between static and dynamic type checking incorrect?

  1. Dynamic type checking slows down the execution
  2. Dynamic type checking offers more flexibility to the programmers
  3. In contrast to Static type checking, dynamic type checking may cause failure in runtime due to type errors
  4. Unlike static type checking dynamic type checking is done during compilation
recategorized by

1 Answer

Best answer
11 votes
11 votes

ANSWER : D

Static Type Checking

A language is statically-typed if the type of a variable is known at compile time instead of at runtime. Common examples of statically-typed languages include Ada, C, C++, C#, JADE, Java, Fortran, Haskell, ML, Pascal, and Scala.

Dynamic Type Checking

Dynamic type checking is the process of verifying the type safety of a program at runtime. Common dynamically-typed languages include Groovy, JavaScript, Lisp, Lua, Objective-C, PHP, Prolog, Python, Ruby, Smalltalk and Tcl.

So, dynamic type checking offers more flexibility to the programmers at the expense of runtime type checking overhead and possible runtime type errors. 

selected by
Answer:

Related questions

5 votes
5 votes
2 answers
1
Arjun asked Apr 22, 2018
8,539 views
Consider the following program{ int x=1; printf("%d",(*char(char*)&x)); }Assuming required header files are included and if the machine in which this program is executed ...
5 votes
5 votes
3 answers
2
Arjun asked Apr 22, 2018
5,622 views
Consider the following declaration :structaddr { char city[10]; char street[30]; int pin; }; struct { char name[30]; int gender; struct addr locate; } person, *kd = &pers...
1 votes
1 votes
2 answers
3