Question 7
7. Which of the following statements is/are True ?
P : C programming language has a weak type system with static types.
Q : Java programming language has a strong type system with static types.
Code :P : C programming language has a weak type system with static types.
Q : Java programming language has a strong type system with static types.
Previous | Next |
UGC-NET CS 2018 July - II Question 6 | UGC NET CS 2018 July - II Question 8 |
Essentially, static typing means that variable types are checked at “compile-time”, or before the code is executed.
C programming language has a weak type system with static types because it lets you define object types as structures, but it doesn’t do much to enforce or remember them. C automatically convert between many types. C++ and Objective-C go further with the definitions but still don’t enforce the resulting types.
Java programming language has a strong type system with static types because Java forces you to define all types and checks them with a virtual machine.
Example of weak static languages: Weak Static Languages: C, C++ And Objective-C
Find here an example to understand strong static language: Strong Static Languages: Java
Both P and Q statements are true.
So, Option (1) is correct answer.
Reference : Understanding Types; Static vs Dynamic, & Strong vs Weak.