Aptitude | GATE CS 1998 | Question 27
Type checking is normally done during
(A) Lexical analysis
(B) Syntax analysis
(C) Syntax directed translation
(D) Code optimization
Answer: (C)
Explanation: Syntax-Directed Translation is used in following cases
- Conversion of infix to Postfix
- Calculation of infix expression
- For creating a Acyclic graph
- Type Checking
- Conversion of Binary number to Decimal
- Counting the numbers of bits (0 or 1 ) in a binary number
- Creation of syntax tree
- To generate Intermediate code
- Storing the data into Symbol table
Please Login to comment...