Compiler Design Week 8 Nptel Assignment Answers

Are you looking for NPTEL Compiler Design Week 8 Nptel Assignment Answers ? You’ve come to the right place! Access the most accurate answers at Progiez.



Compiler Design Week 8 Nptel Assignment Answers
Compiler Design Week 8 Nptel Assignment Answers

Compiler Design Week 8 Nptel Assignment Answers (Jan-Apr 2025)

Course Link: Click Here


1) Type checking checks the input

a) Lexically
b) Semantically
c) Syntactically
d) All the other options

View Answer


2) If the arguments passed to a function call are such that the first and the third arguments are integers while the second one is real, the type expression for the argument list can be

a) Integer X Integer X Real
b) Real X Integer X Integer
c) Integer X Real X Integer
d) None of the other options

View Answer


3) Array bound check can be done

a) Statically
b) Dynamically
c) Both statically and dynamically
d) None of the other options

View Answer


4) Type equivalence checks whether

a) Two type expressions are same or not
b) Two expressions are same or not
c) Two statements are same or not
d) All of the other options

View Answer


5) Type of a statement is

a) Void
b) Type error
c) Void or type error
d) None of the other options

View Answer


Compiler Design Week 8 Nptel Assignment Answers


6) Type checking done by the compiler is

a) Static
b) Dynamic
c) Both static and dynamic
d) None of the other options

View Answer


7) Most programming languages are weakly typed since

a) Such languages put less constraints on the programmer
b) Some type errors can be caught dynamically
c) Both of the other options
d) None of the other options

See also  Deep Learning IIT Ropar Week 8 Nptel Assignment Answers

View Answer


8) For strongly-typed languages

a) Only static type checking is done
b) Only dynamic checking is done
c) Both static and dynamic checking are done
d) No type of checking is done

View Answer


9) Type casting available in many programming languages is an example of

a) Type checking
b) Type coercing
c) Type manipulation
d) None of the given options

View Answer


10) The type expression (Integer X Real) → (Integer Real) corresponds to

a) A function that takes an integer and a real as arguments and returns an integer and a real
b) A function that takes an integer and a real as arguments and returns a real
c) A function that takes an integer and a real as arguments and returns an integer
d) A function that takes an integer and a real as arguments and returns a function that takes an integer and returns a real

View Answer


11) Type inference in programming languages refers to:

a) Explicitly specifying types for all variables
b) Automatically deducing the type of an expression at compile-time
c) Checking types dynamically during runtime
d) Ignoring type checking in a program

View Answer


12) Which of the following statements about type conversion is TRUE?

a) Implicit type conversion always results in data loss
b) Explicit type conversion is also called type coercion
c) Implicit type conversion is performed automatically by the compiler
d) Both (b) and (c)

View Answer


13) Dynamic type checking is necessary in languages that:

a) Perform all type checking at compile-time
b) Allow variables to change their type during execution
c) Do not support type inference
d) Have a very strict static type system

See also  Artificial Intelligence: Knowledge Representation And Reasoning Week 8 Answer

View Answer


Compiler Design Week 8 Nptel Assignment Answers (Jan-Apr 2025)

For answers to others Nptel courses, please refer to this link: NPTEL Assignment