Acl question bank for System Programming Unit-1



Download 43.36 Kb.
Date07.08.2017
Size43.36 Kb.
#28120
ACL Question bank for System Programming

Unit-1

  1. What is system Programming? Explain software hierarchy? What are different characteristics of system programming?

  2. Explain machine structure with diagram. Comparison between Harward and Von Neumann Architectures.

  3. What is Interface? Explain Software interface, Hardware interface and User interface.

  4. Explain logical address space and physical address space.

  5. Explain classification of computer Languages with diagram.

  6. Explain the various stages of the life cycle of a source program with a neat diagram.

  7. Explain system software development and recent trends in software development.

  8. Compare user-centric view and system-centric view of system software.

  9. Explain levels of system software.


Unit-2

  1. Explain following terms :

System software, semantic, semantic gap, application domain, execution domain, specification gap, execution gap, language processor, language translator, detranslator, preprocessor, language migrator, interpreter, source language, target language, problem oriented language, procedure oriented language

OR Compare Problem oriented and Procedure oriented languages.



  1. What is specification gap? What is Semantic gap? Who can bridge the specification gap? How? How can we reduce the semantic gap?

  2. Explain language processing activity.

  3. Explain phases and passes of a language processor. (or toy compiler) OR List various phases of Language Processor. Explain any one phase in detail. OR Explain lexical analysis of language processor OR List various phases of a language processor. Explain roles of phases of Language Processor. OR

What is the single pass and multi pass organization of language processors? Give advantages and disadvantages of both.

  1. Explain symbol tables. Explain linear and non-linear symbol table organization. OR What is Symbol table? Explain how one can organize Symbol table using Linear Data Structure?

  2. Explain memory allocation in block structured language.

  3. Explain data structure for language processing - search data structure and allocation data structure.

Unit-3

  1. Element of assembly language programming.

  2. Which are different assembly language statements? Explain with example.

  3. Discuss Design specification of an assembler. (A simple assembly scheme)

  4. Which are the different assembly language statements? Explain each of them with suitable example.

  5. Explain advanced assembler directives.

  6. Explain the data structure of single pass assembler OR Explain in brief design of a Single Pass Assembler. OR Draw a flowchart of maintaining Table of Incomplete Instruction (TII) in assembler.

  7. Compare single pass and two pass assembler.

  8. Define forward references. How it can be solved using back-patching? Explain with example.

  9. Explain the complete working of the double pass assembler along with the data structure used. OR Describe following data structures: OPTAB, SYMTAB, LITTAB and POOLTAB OR Explain Significance of POOLTAB in the first pass of assembler.

  10. Explain error reporting of assembler OR Advance assembly scheme.

  11. Explain and compare various intermediate code forms for an assembler.

  12. Explain single pass assembler for Intel x86.

  13. Prove the following statements by giving the appropriate reasons.

1) Assembly language simplifies the programming compared to machine language.

2) DC statement does not really implement the constants



  1. Write an assembly language program which calculates average of 10 numbers.

  2. Assembly program to compute N! & equivalent machine language program and its intermediate representation.

  3. Consider the following assembly program:

Assembler directive codes: START 01, END-02

Register code: AREG-01, CREG-03

1. Identify task performed by above program.

2. Generate symbol table

3. Show intermediate code generated by above program




  1. Given the source program:

1) Show the contents of symbol table at the end of pass I.

2) Explain the significance of EQU and ORIGIN statements in the program and explain how they are processed by the assembler.

3) Show the intermediate code generated from the program.




  1. Given the source program:

1) Show the contents of symbol table at the end of pass I.

2) Explain the significance of EQU and ORIGIN statements in the program and explain how they are processed by the assembler.

3) Show the intermediate code generated from the program.




  1. Consider following assembly language program:

Show (i) Contents of Symbol Table (ii) Intermediate codes using Variant I representation.



Unit - 4

  1. Explain difference between macro and subroutine.

  2. What is macro in programming language. Write an algorithm for macro definition. OR Explain macro definition and macro call.

  3. Explain macro expansion process with example. OR List and explain tasks involved in macro expansion.

  4. Discuss two different ways of Macro Expansion. OR

Explain lexical and semantic expansion of macro with example.

  1. Explain positional parameters, keyword parameters and default value parameters for macros.

  2. Explain advanced macro facilities with suitable example. OR Explain with examples - expansion time variables, expansion time statements - AIF and AGO for macro programming. Show their usage for expansion time loop by giving example.

  3. Explain REPT and IRP statement with proper example.

  4. What is macro preprocessor? Explain steps of macro preprocessor design.

  5. Illustrate expansion of nested macro calls by giving example. OR Define two macros of your choice to illustrate nested calls to these macros. Also show their corresponding expansion.

  6. Explain how the nested macro call is processed? How stack is used to manage the data structures of macros in nested call.

  7. Explain design issues and design features of macro processor.

  8. Explain different data structures macro preprocessor. OR Explain use and field of following tables of macro.

KPDTAB, MDT, EVTAB, SSTAB

  1. Discuss: Design of Macro-assembler.

  2. Explain two pass macro processor.

  3. Draw a flowchart and explain simple one pass macro processor.

  4. Write Macro for following: (i) Write a macro which takes B, C, and D as parameters and calculates B*C + C*D. (ii) Define a macro taking A and B as parameters to compute A = A * B + B * B + A + B

  5. Compare and Contrast the following:

(i) macro call and function call

(ii) macro preprocessor and macro assembler.



  1. Compare the features of subroutine and macros with respect to following.

(i) Execution speed

(ii) Processing requirement by assembler.

(iii) Flexibility and generality


  1. Write general purpose macro to move the contents of one area of memory into another area of memory. Assume that destination area is larger in size, remaining part of it should be padded with zeroes at the end of the area.

  2. Define a macro taking starting_location and N as parameters to find summation of all N numbers stored at locations starting from starting_location. The result is to be stored at starting_location.

  3. Do as directed

(i) A macro is a unit of specification for _________________________ through expansion. (Fill in the blank)

(ii) Macro definition is enclosed between a __________________statement and a__________________ statement. (Fill in the blank)

(iii) A _______________________________ is designed to hold the names of all macro defined in a program. (Fill in the blank)

(iv) An ___________________________ counter is maintained to count the number of nested macro calls. (Fill in the blank)

(v) A lexical expansion is typically employed to replace occurrence of formal parameters by corresponding actual parameters. (State True/False)

(vi) Default specification of parameters is useful in situations where a parameter has the different value in most calls. (State True/False)

(vii) Macro definition table is maintained to hold value of sequencing symbols. (State True/False)


  1. Explain following terms with suitable example.

(1) Expansion time variable (3) Semantic expansion

(2) Positional parameter (4) Macro Pre-processor



Unit-5

  1. Describe in detail how relocation and linking is performed. OR

Write an Algorithm of Program Relocation and Program Linking OR

Draw flow chart of “program linking” OR

What is program relocation? How relocation is performed by linker. Explain with example.


  1. What is relocation factor? How is it calculated?

  2. Explain : 1. Address Sensitive Instruction 2. Address Sensitive Program

  3. What is NTAB in linker? What is stored in it?

  4. Explain design of a linker. OR Explain in brief design of a Linker. Write an algorithm for first pass of a linker.

  5. Explain self-relocating program.

  6. What is Overlay? Explain the execution of an overlay structured program.

  7. Explain linking in MS-DOS.

  8. Explain dynamic linking. Draw the flaw chart for dynamic linking.

  9. Explain difference between relocatable and non relocatable program.

  10. Explain object module of the program.

  11. Explain ENTRY and EXTERN statement with example. Take two assembly language modules M1 and M2. M1 should contain ENTRY statement and M2 should contain EXTERN statement.

  12. Explain relocation and linking requirements in segmented addressing with suitable example.

  13. Explain different loading scheme. OR Explain Absolute loader with example OR In brief explain relocating loader. OR Explain BSS loader with example.


Unit – 6

  1. Write a regular expression for a language containing a binary string which does not contain two consecutive 0s or two consecutive 1s anywhere.

  2. Explain types of grammar.

  3. What is grammar? Explain types of grammar. Write an unambiguous grammar for an arithmetic expression containing the operators ↑ (exponentiation), +,*.

  4. Explain left recursion, left factoring and backtracking in top down parsing.

  5. When Left- factoring on a grammar is applied? Apply left- factoring on the below given grammar and perform Predictive Parsing.Grammar is

S -> i E t S | i E t S e S | a

E -> b


String is : i b t a e i b t a

  1. Perform left-factoring on the following grammar

S = i E t S e S | i E t S | a

E = b


  1. Remove left recursion from following production rules:

A -> AaB | x

B -> BCb | y

C -> Cc | epsilon


  1. Consider following grammar S -> aSbS | bSaS | epsilon

Derive the string abab. Draw corresponding parse tree.Are these rules ambiguous? Justify

  1. A language consists of all strings of a’s and b’s which ends with b and does not contain aa. Write regular expression for the language.

  2. Compare top-down and bottom-up parser.

  3. Explain language processor development tools.

  4. Explain recursive descent parser with example.

  5. Discuss Operator precedence grammar.

  6. What is operator precedence parsing? Show operator precedence matrix for following operators: +, - , * , ( , ).Parse following string: |- + * -|

  7. Draw the FA for given regular expression (111+100)*0 , Build a DFA for following regular expression.(a | b)*aab#

  8. What is bottom up parsing? Explain operator precedence parser. Let a grammar for a language is E -> E+E | E*E | id. Check validity of following string using stack based precedence parser. id * id + id * id.

  9. Given the grammer, perform the top-down parsing for the the string +*35*45

E = +TE|E

T = *VT|V

V= 0|1|2|3|………|9


  1. Convert given regular expression to DFA. The expression is (a | b)*abb#

  2. Construct DFA for following regular expression a* ( b* | c*) (a | c ) * #

  3. Construct DFA for following regular expression: (a* | b* )a*ab #

  4. Parse following strings using given LL(1) parsing table (TABLE-I)

(i)id*id + id * id (ii) id + id + id + id




  1. Given a grammar

S→XS | dS | ε

X→Y | Zb | aY

Y→cZ

Z→e


Develop an LL(1) parsing table and check whether the string “dace” is accepted or not?

  1. Given the Grammer, evaluate the string id-id*id using shift reduce parser.

E-> E – E

E -> E * E

E -> id


  1. Given a grammar,

E -> TA

A -> +TA | ε

T -> VB

B ->*VB | ε

V ->id | (E)

Develop an LL(1) parser table and parse following string using the parsing table. id * ( id + id)v



  1. A language consists of all strings of a’s and b’s which ends with b and does not contain aa. Write regular expression for the language.

(b) Parse following strings using given LL(1) parsing table (TABLE-I)

(i) id*id + id * id (ii) id + id + id + id



  1. Describe working of LL(1) parser and parse following string : |- * * + -|

  2. Explain working of LL (1) parser. Parse following string: id + id - (id * id )

  3. Define Simple Phrase and Handle. Using Handle and Simple Phrase trace the bottom up parsing algorithm Grammar is :

E ->T+ E | T – E | T

T ->T *V | T / V | V

V->a | b | c | d

String is : a - b * c + d



  1. Construct NFA and DFA for following regular expression:

(0 | 1)*001#

Unit-7

  1. Explain causes of large semantic gap.

  2. What is compiler? Explain various phases of compilers.

  3. Compare one pass and two pass compilers. Explain various parameter passing mechanisms for functions.

  4. Explain lexical analysis and syntax analysis phase in compilation process.

  5. Discuss parameters for Activation Records.

  6. Explain dynamic memory allocation.

  7. Write Three address codes and triple representation for x = x * y * z + x * y + y * z

  8. Consider the statement a=b+c*10.where a, b, c are of type float. Show the translation of the given statement by different phases of compiler to produce assembly language statement.

  9. Give example(s) of errors detected by first three phases of compiler.

  10. Explain compilation of expression in detail. OR Given following expression: x = -a * b + -a * b

(1) Write three address codes for the expression.

(2) Optimize the three address code if it is possible to do so.

(3) Give triple implementation for the three address code of the expression


  1. Given following expression = - (a+b) *(c+d) + (a+b+c)

1. Draw a Syntax tree for the expression

2. Write a three-address code for the expression



3. Give triple representation for the three address code of the expression

  1. Perform lexical, syntax and semantic analysis on below C statement a=b+c*d*100+e/f Where data type of b, c & e are integers and remaining all variables are float.

  2. Explain operand and register descriptor with example. Also give best evaluation order for arithmetic expression:

  3. Define static pointer. Find Register Requirement (RR) for the below given expression .. f + ( x + y ) * ( ( a + b) / (c - d) )

  4. Prepare Symbol Table & Quadruple Table using Value Numbers method



  1. Explain: Prefix, Infix and Postfix expressions with examples.

  2. Explain various steps of code optimization with example.

Unit-8

  1. Compare compile and interpreters.

  2. What is interpreter? Explain functioning of interpreter. Explain pure & impure interpreters.

  3. What is interpreter? Explain benefits of interpreter.

  4. Write a short note on JVM.

  5. List and explain types of error.

  6. Explain debugging procedure and classification of debuggers.

Download 43.36 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page