Syntax Analyser

Question 1
Marks : +2 | -2
Pass Ratio : 50%
Which of the following system software resides in the main memory?
Text Editor
Assembler
Linker
Loader
Explanation:
Loader is used to loading programs.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
Which of these features of assembler are Machine-Dependent?
Instruction formats
Addressing modes
Program relocation
All of the mentioned
Explanation:
All of these options are features of assembler which are machine dependent.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
A grammar for a programming language is a formal description of _______________
Syntax
Semantics
Structure
Library
Explanation:
The grammar clearly indicates which type of structure does a program has.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
Suppose One of the Operand is String and other is Integer then it does not throw error as it only checks whether there are two operands associated with ‘+’ or not.
True
False
Explanation:
Syntax analyser does not check the type of the operand.
Question 5
Marks : +2 | -2
Pass Ratio : 50%
A compiler can check?
Logical Error
Syntax Error
Both Logical and Syntax Error
Not Logical and Syntax Error
Explanation:
No compiler can ever check logical errors.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
A system program that combines the separately compiled modules of a program into a form suitable for execution?
Assembler
Compiler
Linking Loader
Interpreter
Explanation:
A loader which combines the functions of a relocating loader with the ability to combine a number of program segments that have been independently compiled.
Question 7
Marks : +2 | -2
Pass Ratio : 100%
Output file of Lex is __________ the input file is Myfile.
Myfile.e
Myfile.yy.c
Myfile.lex
Myfile.obj
Explanation:
This Produce the filr “myfile.yy.c” which we can then compile with g++.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
What does a Syntactic Analyser do?
Maintain Symbol Table
Collect type of information
Create parse tree
None of the mentioned
Explanation:
Syntax analyzer will just create a parse tree. Semantic Analyzer checks the meaning of the string parsed.
Question 9
Marks : +2 | -2
Pass Ratio : 50%
By whom is the symbol table created?
Compiler
Interpreter
Assembler
None of the mentioned
Explanation:
Symbol table is created by the compiler which contains the list of lexemes or tokens.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
Type checking is normally done during ____________
Lexical Analysis
Syntax Analysis
Syntax Directed Translation
Code generation
Explanation:
It is the function of Syntax directed translation.