MC0073 Spring Drive Assignment 2012

download MC0073 Spring Drive Assignment 2012

of 4

Transcript of MC0073 Spring Drive Assignment 2012

  • 7/31/2019 MC0073 Spring Drive Assignment 2012

    1/4

    Spring 2012

    Master of Computer Application (MCA) Semester III

    MC0073 Systems Programming 4 Credits

    (Book ID: B0811)

    Assignment Set 1 (60 Marks)

    Answer all questions

    1. Consider the following C Language program and list out the outcomes of: Lexical Analysis Syntactic Analysis Semantic Analysis phases respectively (10 marks)

    main()

    {

    int a, b, c,d;

    printf( enter the value of a, &a);

    printf( enter the value of a, &b);

    if ( a > b)

    {

    c = a+b;

    printf ( %d %d ,c);

    }else

    {

    d=a+b;

    printf ( %d %d ,d);}

    }

    2. What is the limitation of conventional pass-1 pass-2 compilation? How do youovercome it? (5 marks)

    3. Identify the following notations and define them with examples: (10 Marks) L, , T, NT, and G define them with examples Identify the basic elements of Grammar G What is sentinel form? Give an example

  • 7/31/2019 MC0073 Spring Drive Assignment 2012

    2/4

    4. Classify and define Grammars. Which Grammar is best suitable for ProgrammingLanguages and why? ( 5 Marks)

    5. How many characters can be represented by ASCII-8 data format? What is thelimitation of ASCII-7 format? (5 Marks)

    6. Compare RISC Architecture with CISC Architecture? What was the necessity tomove to RISC architecture? (5 Marks)

    7. Discuss Addressing Modes of Intel 80X86 with suitable examples. (10 Marks)8. List out the pass-1 data structures and pass-2 data structures. ( 5 Marks)9. Define Macro. Write a C program with a macro to find out biggest of two

    numbers. ( 5 Marks)

  • 7/31/2019 MC0073 Spring Drive Assignment 2012

    3/4

    Spring 2012

    Master of Computer Application (MCA)

    Semester IIIMC0073 Systems Programming 4 Credits

    (Book ID: B0811)

    Assignment Set 2 (60 Marks)

    Answer All Questions

    1. Define Bootstrapping. Distinguish between Software Bootstrapping and CompilerBootstrapping. ( 5 Marks)

    2. What is the function of following Intelx86 registers ( 5 Marks) AX DX, CX, DI SI SP BP BX

    3. Write the algorithm of Boot Strap Loader. ( 5 Marks)

    4. Identify Lexemes and Tokens in the following statements: ( 5 Marks) A5=B+9 x=(y+z)/ 10

  • 7/31/2019 MC0073 Spring Drive Assignment 2012

    4/4

    5. Given the following Grammar ( 10 Marks)F id

    T F

    E T

    F id

    T F

    F id

    T T*FE E+TE

    Parse the input string id+id*id by Bottom-up Parsing or Shift-Reduce Parsing

    method.

    6. With a neat Block Diagram Explain the Phases of Compiler. ( 10 Marks)

    7. Write short notes on: ( 10 Marks) Compiler-Writing Tools Static, Dynamic and Stack Memory allocations Heap and Garbage Collection

    8. Define: Finite State Automaton, Deterministic Finite state Automaton and Non-Deterministic Finite State Automaton with suitable examples. ( 6 Marks)

    9. Bring out the Basic functions of Loader. ( 4 Marks)