Docstoc

PRINCIPLES OF PROGRAMMING LANGUAGES (PDF)

Document Sample
PRINCIPLES OF PROGRAMMING LANGUAGES (PDF) Powered By Docstoc
					Split by PDF Splitter




                 Code No: T0521                                                                       SET - 1

                          II B.Tech II Semester (R07) Regular/supply Examinations, Apr- 2010

                            PRINCIPLES OF PROGRAMMING LANGUAGES
                                           (Computer Science and Engineering)
                 Time: 3 Hours                                                              Max Marks: 80
                                              Answer any FIVE Questions
                                             All Questions carry equal marks


                 1.     a) What are the reasons for studying Programming languages?
                        b) What distinguishes declarative languages from imperative languages?

                 2.     a) What is the difference between syntax & semantics?
                        b) What are associativity and precedence? Why are they significant in parse trees?
                        c) What is meant by ambiguity? Give example.

                 3.     a) What purpose do data types serve in a programming language?
                        b) What is the difference between discrete and scalar types?
                        c) Give two examples of languages that lack a Boolean type. What do they use
                           instead ?

                 4.     a) How does operand evaluation order interact with functional side effect?
                        b) How does C support Relational and Boolean expressions?
                        c) What mixed-mode assignments are allowed in Ada?

                 5.     What are the semantic models for parameter passing? Explain in detail.

                 6.     a) Describe the concept of abstract data types in terms of user defined data types.
                        b) Write about parameterized abstract data types in Ada.

                 7.     a) Briefly describe the process of resolution in Logic programming.
                        b) How can an exception be explicitly raised in Ada? Give example.

                 8.     a) What are the functional forms provided by LISP?
                        b) Describe Predicate functions for symbolic atoms and list.




                                                               1 of 1
Split by PDF Splitter




                 Code No: T0521                                                                     SET - 2

                          II B.Tech II Semester (R07) Regular/supply Examinations, Apr- 2010

                            PRINCIPLES OF PROGRAMMING LANGUAGES
                                           (Computer Science and Engineering)
                 Time: 3 Hours                                                             Max Marks: 80
                                              Answer any FIVE Questions
                                             All Questions carry equal marks

                 1.     a) Explain the differences between interpretation and compilation. What are the
                           comparative advantages and disadvantages of the two approaches?
                        b) How do type declaration statements for simple variables affect the readability
                        of a language?

                 2.     a) How does axiomatic semantics define the meanings of a program? Describe
                        with examples.
                        b) How does a scanner identify lexical errors? How does it respond?

                 3.     a) What is the difference between type equivalence and type compatibility?
                        b) Discuss the comparative advantages of structural and name three languages
                        that use each approach.

                 4.     a) What are the design issues for logically controlled loop statements?
                        b) What is the main reason for user-located loop control statements invented?
                        c) What is a user-defined iteration control?

                 5.     a) What is a sub program? What are the design issues of subprograms?
                        b) Describe about generic function in C++

                 6.     a) Write short notes on abstract data types in C++
                        b) What is the construct used by Java for naming encapsulation? Give example.

                 7.     a) What is a unification? Why is it important in logic programming?
                        b) Illustrate with a program the mechanisms of C++ exception handling

                 8.     a) What are the data objects provided by LISP? Explain with examples.
                        b) What is a functional form? Describe the functional compositions of LISP with
                        examples.




                                                              1 of 1
Split by PDF Splitter




                 Code No: T0521                                                                     SET - 3

                          II B.Tech II Semester (R07) Regular/supply Examinations, Apr- 2010

                            PRINCIPLES OF PROGRAMMING LANGUAGES
                                           (Computer Science and Engineering)
                 Time: 3 Hours                                                              Max Marks: 80
                                              Answer any FIVE Questions
                                             All Questions carry equal marks

                 1.     a) Explain the process of compilation in each phase of a compiler
                        b) What is the difference between a compiler and a processor?

                 2.     a) What is an attribute grammar? What are the features of attribute?
                        b) Give the operational semantics for the C statement
                        for (expr 1 ; expr 2; expr 3) {
                        ….
                        }

                 3.     a) Explain the distinction between type conversion, type coercion, and non
                        converting type casts.
                        b) Explain the difference between row-major and column-major layout for
                        contiguously allocated arrays. Why does a programmer need to know which
                        layout the compiler uses? Why do most language designers consider row-major
                        layout to be better?

                 4.     a) What are logically controlled loops? What are the design issues?
                        b) Give some examples for nesting selectors.

                 5.     a) What are the advantages of static local variables over stack dynamic variables?
                        b) Write the differences between procedures and functions.


                 6.     a) How are instance of C++ template classes created? Explain with an example.
                        b) How are instances of Ada generic C classes created? Explain with an example.

                 7.     a) Describe Java Event Model. List the handler methods.
                        b) What is the purpose of Java finally clause?

                 8.     Write briefly about Haskell


                                                              1 of 1
Split by PDF Splitter




                 Code No: T0521                                                                       SET - 4

                          II B.Tech II Semester (R07) Regular/supply Examinations, Apr- 2010

                            PRINCIPLES OF PROGRAMMING LANGUAGES
                                          (Computer Science and Engineering)
                 Time: 3 Hours                                                            Max Marks: 80
                                              Answer any FIVE Questions
                                             All Questions carry equal marks

                 1.     a) What are the fundamental features of object oriented programming language?
                        b) What does a linker do?
                        c) What are the advantages in implementing a language with a pure interpreter?

                 2.     a) How does Denotational semantics describe the meaning of programs? Give
                        examples.
                        b) Prove that the following grammar is ambiguous.
                                S→A
                                A→A+A/id
                                id→a/b/c

                 3.     a) What is a dangling references? How are they created, and why are they a
                        problem?
                        b) What is pointer reversal? What problem does it address?
                        c) Do dangling references and garbage ever arise in the same programming
                        language? Why or why not?
                 4.     a) Discuss about scope of a loop variable in for statement of Ada.
                        b) What is an assignment? Describe the variety of assignment statements.

                  5.    a) Mention the different types of parameters. How are the actual parameters
                        binded to formal to formal parameters?
                        b) Discuss briefly about C++ generic functions.

                 6.     a) What is a C++ name pace and what is its purpose?
                        b) How are C++ and Java Class objects created? Give examples.

                 7.     a) How are exceptions binded to handlers in Ada,C++ , Java?
                        b) What are the forms of Prolog term?

                 8.     a) Write about function declaration in ML.
                        b) What scoping rule is used in COMMON LISP, ML, Haskell?

                                                             1 of 1

				
DOCUMENT INFO
Shared By:
Stats:
views:204
posted:2/9/2011
language:English
pages:4
Description: PRINCIPLES OF PROGRAMMING LANGUAGES