Data Structure for Representing Parsing Table

Question 1
Marks : +2 | -2
Pass Ratio : 100%
In which way a macro processor for assembly language can be implemented?
Independent two-pass processor
Independent one-pass processor
Processor put into pass 1 of a standard two pass assembler
All of the mentioned
Explanation:
A general-purpose macro processor or general purpose preprocessor is a macro designed for string manipulation, macro definition.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
A system program that combines separately compiled modules of a program into a form suitable for execution is?
Assembler
Linking Loader
Cross Compiler
None of the mentioned
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 into an executable program.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
A compiler is a program that ___________
Program is put into memory and executes it
Translation of assembly language into machine language
Acceptance of a program written in a high level language and produces an object program
None of the mentioned
Explanation:
A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code).
Question 4
Marks : +2 | -2
Pass Ratio : 100%
A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar S—-> xxW ( PRINT “1”) S—-> y { print ” 2 ” } S—-> Sz { print ” 3 ” ) What is the translation of xxxxyzz using the syntax directed translation scheme described by the above rules?
23131
11233
11231
33211
Explanation:
Initially 2 is printed then 3 then 1 3 1.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
Compiler can diagnose __________
Grammatical errors only
Logical errors only
Grammatical and logical errors
None of the mentioned
Explanation:
Only syntactical errors can be detected by the compiler.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
A simple two-pass assembler does which of the following in the first pass?
It allocates space for the literals
Calculates total length of the program
Symbol table is built for the symbols and their value
All of the mentioned
Explanation:
A two-pass assembler. Each pass scans the program, the first pass generates the symbol table and the second pass generates the machine code.
Question 7
Marks : +2 | -2
Pass Ratio : 100%
The computer language generally translated to pseudocode is ___________
Assembly
Machine
Pascal
FORTRAN
Explanation:
An assembly language (or assembler language) is a low-level programming language for a computer, or other programmable device, in which there is a very strong (generally one-to-one) correspondence between the language and the architecture’s machine code instructions.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
Resolution of externally defined symbols is performed by ___________
Linker
Loader
Compiler
Interpreter
Explanation:
A linker or link editor is a computer program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another object file.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
A system program that set-up an executable program in the main memory ready for execution is?
Assembler
Linker
Loader
Text editor
Explanation:
A loader is the part of an operating system that is responsible for loading programs and libraries. It is important that with the starting of a program, as it places programs into memory and executes it.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
A programmer by mistake writes multiplication instead of division, such error can be detected by?
Compiler
Interpreter
Compiler or interpreter test
None of the mentioned
Explanation:
No Logical errors can be detected.