Important Question for System Programming | Sp Gtu | Gtu exam | Mid Sem Exam


Important Questions of SP


Chapter 1:- Overview of System Software

  1. What is the difference between System Software and Application software?(3 mark)
  2. Compare Problem oriented and Procedure oriented languages.(7 mark)
  3. Explain the various stages of the life cycle of a source program with a neat diagram.(7 mark)

Chapter 2:-Overview of Language Processors

  1. What is Symbol table? Explain how one can organize Symbol table using Linear Data Structure?(7 mark)
  2. List various phases of Language Processor. Explain any one phase in detail.(7 mark)
  3. Explain lexical analysis of language processor.(7 mark)
  4. How a lexical analyzer recognizes unsigned numbers such as 12,12.3,12.3E4?(7 mark)

Chapter 3:- Assemblers

  1. What are the Advanced Assembler Directives? Explain any two with example.(7 mark)
  2. Given the source program:(7 mark) START 100
    A DS 3
    L1 MOVER AREG, B
    ADD AREG, C
    MOVEM AREG, D
    D EQU A+1
    L2 PRINT D
    ORIGIN A-1
    C DC '5'
    ORIGIN L2+1
    STOP
    B DC '19'
    END L1


    • Show the contents of the symbol table at the end of Pass I.
    • Explain the significance of EQU and ORIGIN statement in the program and explain how they are processed by the assembler.
    • Show the intermediate code generated for the program.
  3. Explain in brief design of a Two Pass Assembler.(7 mark)
  4. Explain in detail any two advanced assembler directives.(7 mark)
  5. Describe following data structures: OPTAB, SYMTAB, LITTAB and POOLTAB. ( 4 mark)
  6. Define forward references. How it can be solved using back-patching? Explain with example.(7 mark)
  7. Define Assembler. List out tasks performed during different phase of assembler. ( 3 mark )
  8. Compare Variant I and Variant II of intermediate code generation for assembler. Write intermediate code for Variant I and Variant II of below program fragment. (7 mark)      START 200
         READ A
    LOOP MOVER AREG, A
         .
         .
         .
         SUB AREG,=’1’
         BC GT,LOOP
         STOP
    A    DS 1 v LTORG
         ...

Chapter 4:- Macro and Macro Processors

  1. Explain use and field of following tables of macro.(7 mark) KPDTAB, MDT, EVTAB, SSTAB
  2. Explain following facilities for expansion time loop with example. (1) REPT statement (2) IRP statement (7 mark)
  3. Draw a flowchart and explain simple one pass macro processor.(7 mark)
  4. Write and explain the algorithm for macro expansion.( 4 mark)
  5. Explain in brief the design of a macro assembler.(7 mark)
  6. Describe the use of stacks in Expansion of Nested macro calls with example.( 7 mark)
  7. Give suitable example for macro by using conditional expansion or expansion time loops.( 4 mark)
  8. Write Macro definition with following and explain.
    • Macro using expansion time loop
    • Macro with REPT statment
  9. Define Macro - preprocessor. Explain steps of Macro Preprocessor Design. ( 4 mark)
  10. Explain Nested macro call with suitable example. ( 3 mark)

Chapter 5:- Linkers and Loaders

  1. Explain Absolute loader with example.(7 mark)
  2. With example explain how relocation is performed by linker?(7 mark)
  3. In brief explain relocating loader.(7 mark)
  4. What is program relocation? How relocation is performed by linker?(3 mark)
  5. What is program relocation? How relocation is performed by linker? Explain with example.( 7 mark)
  6. Differentiate Linker and Loader. (3 mark)
  7. Write a brief note on MS-DOS Linker. (7 mark)
  8. Explain the term self-relocating program. (3 mark)
  9. Compare Absolute Loader with Relocating Loader (BSS Loader). (4 mark)

Chapter 6:- Scanning and Parsing

  1. Explain types of grammar.(7 mark)
  2. Explain recursive descendent parsing algorithm.(7 mark)
  3. Write algorithm for practical approach of top down parsing.(7 mark)
  4. Construct an LL(1) parsing table for the following grammar. (7 mark) S → aBDh
    B → cC
    C → bC | ε
    D → EF
    E → g | ε
    F → f | ε
  5. Answer the following Questions: ( 7 mark) (i) Write unambiguous production rules to produce arithmetic expression consisting of +, *, ( , ), id.
    (ii) Remove left recursion from that unambiguous production rules and generate LL(1) parsing table for that grammar.
  6. Answer the Following:- ( 7 mark ) (i) Define Operator precedence grammar. Convert following production rules of grammar into suitable Operator precedence grammar.
          E → EAE | id
          A → - | *
    (ii) Generate operator precedence relation matrix for converted Operator precedence grammar. Show how id - id * id will be parsed using Operator Precedence Matrix.
  7. Given the Grammar, evaluate the string id - id * id using shift reduce parser. ( 4 mark )
       E-> E – E
       E -> E * E
       E -> id

Chapter 7:- Compilers

  1. What is main task of semantic analysis phase? Explain inherited and synthesized attributes in detail with example.(7 mark)
  2. What is the use of static pointer and dynamic pointer in compiler? Explain working of Display with suitable example.( 7 mark)
  3. Explain the front end of toy compiler with suitable example.( 4 mark)
  4. Write a code fragment to find out whether number is odd or even. Draw control flow graph. Perform control flow analysis.( 7 mark)
  5. What is memory binding? Explain dynamic memory allocation using extended stack model.( 7 mark)
  6. Explain Analysis and Synthesis phase of Compiler. ( 7 mark)
    Perform lexical, syntax and semantic analysis on below C statement:
    int i;
    float a, b;
    a = b + i;
  7. List out various Code Optimization techniques used in Compiler. Explain any three technique with suitable example. ( 7 mark)
  8. Explain triple, quadruple and indirect triples representation with example. ( 7 mark)

Chapter 8:- Interpreters & Debuggers

  1. What is interpreter? Explain pure & impure interpreters.(7 mark)
  2. Explain the drawbacks and benefits of Interpretation.(7 mark)
  3. What is interpreter? Explain benefits of interpreter. Compare interpreter and compiler.(7 mark)
  4. Explain pure and impure interpreter.(3 mark)
  5. Describe three components of the interpreter. (3 mark)
  6. Differentiate Compiler and Interpreter. (3 mark)


Post a Comment

12 Comments