Part 3 Viva important questions
1. Define macro processor.
Macro processor is system software that replaces each macroinstruction with the
corresponding group of source language statements. This is also called as
expanding of macros.
2. What do macro expansion statements mean?
These statements give the name of the macroinstruction being invoked and the
arguments to be used in expanding the macros. These statements are also known as
macro call.3. What are the directives used in macro definition?
MACRO - it identifies the beginning of the macro definition
MEND - it marks the end of the macro definition
4. What are the data structures used in macro processor?
DEFTAB – the macro definitions are stored in a definition table i.e. it contains a
macro prototype and the statements that make up the macro body.
NAMTAB – it is used to store the macro names and it contains two pointers for
each macro instruction which indicate the starting and end location of macro
definition in
DEFTAB. it also serves as an index to DEFTAB
ARGTAB – it is used to store the arguments during the expansion of macro
invocations.
5. Define conditional macro expansion.
If the macro is expanded depends upon some conditions in macro definition
(depending on the arguments supplied in the macro expansion) then it is called as
conditional macro expansion.
6. What is the use of macro time variable?
Macro time variable can be used to store working values during the macro
expansion. Any symbol that begins with the character & and then is not a macro
instruction parameter is assumed to be a macro time variable.
7. What are the statements used for conditional macro expansion?
IF-ELSE-ENDIF statement
WHILE-ENDW statement
8. What is meant by positional parameters?
If the parameters and arguments were associated with each other according to their
positions in the macro prototype and the macro invocation statement, then these
parameters in macro definitions are called as positional parameters.
9. Consider the macro definition
#define DISPLAY (EXPR) Printf (“EXPR = %d\n”, EXPR)
Expand the macro instruction DISPLAY (ANS)
Ans.: Printf (“EXPR = %d\n”, ANS)
10. What are known as nested macro call?
The statement, in which a macro calls on another macro, is called nested macro
callIn the nested macro call, the call is done by outer macro and the macro called is
the inner macro.
11. How the macro is processed using two passes?
Pass1: processing of definitions
Pass 2:actual-macro expansion.
12. Give the advantage of line by line processors.
It avoids the extra pass over the source program during assembling.
It may use some of the utility that can be used by language translators
so that can be loaded once.
13. What is meant by line by line processor?
This macro processor reads the source program statements, process the statements
and then the output lines are passed to the language translators as they are
generated, instead of being written in an expanded file.
14. Give the advantages of general-purpose macro processors.
The programmer does not need to learn about a macro facility for each
compiler.
Overall saving in software development cost and maintenance cost.
15. What is meant by general-purpose macro processors?
The macro processors that are not dependent on any particular programming
language, but can be used with a variety of different languages are known as
general purpose macro processors.
Eg. The ELENA macro processor.
16. What are the important factors considered while designing general purpose
macro processors?
comments
grouping of statements
tokens
syntax used for macro definitions
17. What is the symbol used to generate unique labels?
$ symbol is used in macro definition to generate unique symbols. Each macro
expansion the $ symbol is replaced by $XX, where XX is the alpha numeric
character.
18. How the nested macro calls are executed?
The execution of nested macro call follows the LIFO rule. In case of nested macro
calls the expansion of the latest macro call is completed first.
19. Mention the tasks involved in macro expansion.
identify the macro calls in the program
the values of formal parameters are identified
maintain the values of expansion time variables declared in a macro
expansion time control flow is organized
determining the values of sequencing symbols
expansion of a model statement is performed
20. How to design the pass structure of a macro assembler?
To design the structure of macro-assembler, the functions of macro preprocessor
and the conventional assembler are merged. After merging, the functions are
structured into passes of the macro assembler.
TEXT EDITORS
1. Define interactive editor?
An interactive editor is a computer program that allows a user to create and revise
a target document. The term document includes objects such as computer
programs, text, equations, tables, diagrams, line art, and photographs any thing that
one might find on a printed page.
2. What are the tasks performed in the editing process?
4 tasks
Select the part of the target document to be viewed and manipulated.
Determine how to format this view on-line and how to display it.
Specify and execute operations that modify the target document.
Update the view appropriately.
3. What are the three categories of editor’s devices?
Text device/ String devices
Button device/Choice devices
Locator device4. What is the function performed in editing phase?
In the actual editing phase, the target document is created or altered with a set of
operations such as insert, delete, replace, move and copy.
5. Define Locator device?
Locator devices are two-dimensional analog-to-digital converters that position a
cursor symbol on the screen by observing the user’s movement of the device. The
most common such devices for editing applications are the mouse and the data
tablet.
6. What is the function performed in voice input device?
Voice-input devices, which translate spoken words to their textual equivalents,
may prove to be the text input devices of the future. Voice recognizers are
currently available for command input on some systems.
7. What are called tokens?
The lexical analyzer tracks the source program one character at a time by making
the source program into sequence of atomic units is called tokens.
8. Name some of typical tokens.
Identifiers, keywords, constants, operators and punctuation symbols such as
commas and parentheses are typical tokens.
9. What is meant by lexeme?
The character that forms a token is said to be a lexeme.
10. Mention the main disadvantage of interpreter
The main disadvantage of interpreter is that the execution time of interpreted
program is slower than that of a corresponding compiled object program.
11. What is meant by code optimization?
The code optimization is designed to improve the intermediate code, which helps
the object program to run faster and takes less space.
12. What is error handler?
The error handler is used to check if there is an error in the program. If any error, it
should warn the programmer by instructions to proceed from phase to phase.
13. Name some of text editors.
line editors stream editors
screen editors
word processors
structure editors
14. What for debug monitors are used?
Debug monitors are used in obtaining information for localization of errors.
15. Mention the features of word processors.
moving text from one place to another
merging of text
searching
word replacement
16. What are the phases in performing editing process?
Traveling phase
Filtering phase
Formatting phase
Editing phase
17. Define traveling phase.
The phase specifies the region of interest. Traveling is achieved using operations
such as next screenful, bottom, find pattern.
18. Filtering phase.
The selection of what is to be viewed and manipulated in given by filtering.
19. Editing phase
In this phase, the target document is altered with the set of operations such as
insert, delete, replace, move and copy.
20. Define user interface?
User interface is one, which allows the user to communicate with the system in
orderto perform certain tasks. User interface is generally designed in a computer to
make it easier to use.
21. Define input device?
Input device is an electromechanical device, which accepts data from the outside
world and translates them into a form, which the computer can interpret.
22.Define output devices
Output devices the user to view the elements being edited and the results of the
editing operations.
23. What are the methods in Interaction language of a text editor?
Typing –oriented or text command oriented method
Function key interfaces
menu oriented method
24. Define interactive debugging systems.
An interactive debugging system provides programmers with facilities that aid in
the testing and debugging of programs.
Debugging functions and capabilities
Relationship with other parts of the system
User interface criteria.
25. Define editor structure.
The command language processor accepts input from the users input devices and
analyzes the tokens and syntactic structure of the commands
26. Give the components of editor structure
4 components
Editing component
Traveling component
Viewing component
Display component
27. What are the basic types of computing environments used in
editor’s functions?
Editor’s function in three basic types of computing environments
i. Time sharing ii. Stand-alone iii. Distributed
End😊

0 Comments