Close
Login to Your Account
Faadooengineers

Results 1 to 1 of 1

Thread: Imp Questions for Principle of Programming Languages

  1. #1

    Pdf 32 Imp Questions for Principle of Programming Languages

    hey guys....i think these questions will be really helpful to all of you--

    Chapter 1


    1. Define the terms program and language. What is a programming language?
    2. Explain the significances of studying the principle of programming languages?
    3. Explain differences between a natural language and a formal language?
    4. Evaluate the reasons for the success of a language that is widely used on a general purpose computer (or) Give the list of attributes of a programming language and discuss them.
    5. Discuss the importance of program testing and debugging in a programming language.
    6. Consider the following simple language. A and B represent names of integer variables. Each statement may have a label as a prefix. Statements in the language are as follows.
    A = B //Assign A the value of B
    A = A + 1 //Add 1 to A
    A = A – 1 //Subtract 1 from A
    if A = 0 then goto L // If A=0, transfer control to statement L
    if A > 0 then goto L //If A>0, transfer control to statement L
    goto L //Transfer control to statement L
    halt // Stop Execution
    For example, the program that computes A = A + B can be given by:
    L: A = A + 1
    B = B - 1
    if B >0 then goto L
    halt
    a. Write the following programs in this language
    i. Given a and b compute x = a + b
    ii. Given a and b compute x = a * b
    iii. Given a and b compute x = a * b and y = c * d
    b. Discuss minimal set of extensions needed to make this language easy to use. Consider concepts like subprograms, new statements, declarations.

    Chapter 2

    1. List the key components of the conventional computer that are closely related to the major aspects of a programming language? Also show the diagram of the organization of these major components.
    2. Explain the significance of sequence control in operating a computer. Also show the process of program interpretation and execution with the help of a diagram.
    3. What is the difference between program address register and data register?
    4. Describe the dynamic behavior of a computer with respect to the process of program execution.
    5. Explain in detail the different types of translators?
    6. Explain the differences between two approaches to execute programs in high-level languages?
    7. Draw the complete structure of a typical language implementation.
    8. What is the difference between a compiled and interpreted language?
    9. Define a virtual computer with respect to the language implementation. Also list the three factors that lead to differences among implementations of the same language.
    10. Draw the layers of virtual computers for a web application.
    11. What is Binding and Binding Time? Also explain the four classes of Binding times.
    12. Explain the details of the properties that can be bound to the operator “+” in the statement X = Y + Z.



    Chapter 3

    1. What do you understand by syntax and semantics of a programming language?
    2. List the general syntactic criteria of a programming language. Also explain the problem of ambiguity in the language design using the example of conditional statement.
    3. List the different stages in the process of translation of a high-level program to an object code. Also draw the complete structure of a compiler.
    4. Explain the various functionalities involved in the semantic analysis of the source program.
    5. What is the difference between a macro and a function?
    6. Explain the significance of the optimization in the synthesis of the object program.
    7. Formally, define the following terms: grammar, language and program.
    8. What is a parse tree? Give the parse tree the simple assignment statement A = B + (C * D).
    9. When do you say a grammar is ambiguous? When do you say that a language is inherently ambiguous? Give an ambiguous and unambiguous grammar for the language defined as “the set of strings of any length generated over {0,1}”.
    10. Define the 5-tuple of a finite state automata machine using an example.

    Problems on DFA:

    1. Give the DFA for the following languages defined over Σ= {0,1}
    a. The set of all strings having even length
    b. The set of all strings terminating with ‘1’
    c. The set of all strings having ‘01’ as substring
    d. The set of all strings having three consecutive 0`s.
    e. The set of all strings having even number of 1`s and each 1 is followed by at least one 0.
    f. The set of all strings having the 3rd position ‘1’ from the end.
    g. The set of all strings having even length and odd number of 0`s.
    h. The set of all strings having exactly two 0`s and at least two 1`s.
    i. The set of all strings having length multiple of 4.
    j. The set of all strings having odd number of 0`s and ending with 1.
    k. The set of all strings having 1 at every odd position.
    l. The set of all strings beginning with 1 and ending with 0
    m. The set of all strings having at least three 1`s.
    n. The set of all strings other than the strings 11 and 111.
    o. The set of all strings that does not contain the substring 110.
    p. The set of all strings that starts with 0 and has odd length, or starts with 1 and has even length.

    Attached Files for Direct Download
      File Name:
      File Size:
      175.0 KB
      Total Downloads:
      1004
    * Click on the 'file icon' or 'file name' to start downloading
    Last edited by Sakshi Dutta; 2nd March 2011 at 08:43 AM. Reason: Formatting..


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Share anywhere and get download.

50%