INSTITUTE OF AERONAUTICAL ENGINEERING

Similar documents
St. MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

R13 SET Discuss how producer-consumer problem and Dining philosopher s problem are solved using concurrency in ADA.

Programming Languages, Summary CSC419; Odelia Schwartz

6. Discuss how producer-consumer problem and Dining philosophers problem are solved using concurrency in ADA. [16]

G COURSE PLAN ASSISTANT PROFESSOR Regulation: R13 FACULTY DETAILS: Department::

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING (AUTONOMOUS)

INSTITUTE OF AERONAUTICAL ENGINEERING

Concepts of Programming Languages

COURSE DESCRIPTION FORM. Level Credits Periods/ Week Prerequisites

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Programming Languages 2nd edition Tucker and Noonan"

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

MLR INSTITUTE OF TECHNOLOGY DUNDIGAL , HYDERABAD QUESTION BANK

INSTITUTE OF AERONAUTICAL ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Informal Semantics of Data. semantic specification names (identifiers) attributes binding declarations scope rules visibility

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

S.No Question Blooms Level Course Outcome UNIT I. Programming Language Syntax and semantics

Programmiersprachen (Programming Languages)

St. MARTIN S ENGINEERING COLLEGE Dhulapally,Secunderabad DEPARTMENT OF INFORMATION TECHNOLOGY Academic year

G Programming Languages - Fall 2012

Chapter 5. Names, Bindings, and Scopes

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad COMPUTER SCIENCE AND ENGINEERING QUESTION BANK OPERATING SYSTEMS

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

MIDTERM EXAMINATION - CS130 - Spring 2005

NOTE: Answer ANY FOUR of the following 6 sections:

Com S 541. Programming Languages I

Contents. Chapter 1 SPECIFYING SYNTAX 1

Informatica 3 Syntax and Semantics

Types. What is a type?

9/7/17. Outline. Name, Scope and Binding. Names. Introduction. Names (continued) Names (continued) In Text: Chapter 5

Principles of Programming Languages. Lecture Outline

CMSC 331 Final Exam Section 0201 December 18, 2000

Programming Languages Third Edition. Chapter 7 Basic Semantics

CS 415 Midterm Exam Spring 2002

Programming Languages Third Edition

CSCI 3155: Principles of Programming Languages Exam preparation #1 2007

Programming Paradigms

CS 3360 Design and Implementation of Programming Languages. Exam 1

Concepts of Programming Languages

Introduction. A. Bellaachia Page: 1

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

MIDTERM EXAM (Solutions)

Compiling and Interpreting Programming. Overview of Compilers and Interpreters

CST-402(T): Language Processors

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

11. a b c d e. 12. a b c d e. 13. a b c d e. 14. a b c d e. 15. a b c d e

INSTITUTE OF AERONAUTICAL ENGINEERING

Chapter 3. Describing Syntax and Semantics

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

Chapter 3:: Names, Scopes, and Bindings (cont.)

Chapter 3:: Names, Scopes, and Bindings (cont.)

Software II: Principles of Programming Languages. Why Expressions?

Chapter 10 Implementing Subprograms

Attributes, Bindings, and Semantic Functions Declarations, Blocks, Scope, and the Symbol Table Name Resolution and Overloading Allocation, Lifetimes,

CS 242. Fundamentals. Reading: See last slide

TUTORIAL QUESTION BANK

Chapter 5 Names, Bindings, Type Checking, and Scopes

MIDTERM EXAMINATION - CS130 - Spring 2003

Chapter 1. Preliminaries

Chapter 6 Control Flow. June 9, 2015

EI326 ENGINEERING PRACTICE & TECHNICAL INNOVATION (III-G) Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement

SE352b: Roadmap. SE352b Software Engineering Design Tools. W3: Programming Paradigms

Chapter 1. Preliminaries

Test 1 Summer 2014 Multiple Choice. Write your answer to the LEFT of each problem. 5 points each 1. Preprocessor macros are associated with: A. C B.

SEMANTIC ANALYSIS TYPES AND DECLARATIONS

HANDLING NONLOCAL REFERENCES

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

Imperative Programming

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

G Programming Languages - Fall 2012

Chapter 7. Expressions and Assignment Statements ISBN

COP4020 Programming Languages. Compilers and Interpreters Robert van Engelen & Chris Lacher

Chapter 7. Expressions and Assignment Statements

Control Flow February 9, Lecture 7

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

COSC252: Programming Languages: Semantic Specification. Jeremy Bolton, PhD Adjunct Professor

COMPILER DESIGN

UNIT 3

MLR Institute of Technology Dundigal, Quthbullapur (M), Hyderabad

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements

Comp 333: Concepts of Programming Languages Fall 2016

Semester Review CSC 301

Chapter 3:: Names, Scopes, and Bindings

Final-Term Papers Solved MCQS with Reference

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

ST.MARTIN'S ENGINEERING COLLEGE Dhulapally,Secunderabad-014

22c:111 Programming Language Concepts. Fall Types I

CS152 Programming Language Paradigms Prof. Tom Austin, Fall Syntax & Semantics, and Language Design Criteria

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

Lecture Overview. [Scott, chapter 7] [Sebesta, chapter 6]

Transcription:

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad -500 043 INFORMATION TECHNOLOGY TUTORIAL QUESTION BANK Name : PRINCIPLES OF PROGRAMMING LANGUAGES Code : A40511 Class : II B. Tech II Semester Branch : Information Technology Year : 2016 2017 Faculty : Mrs. B.Dhanalaxmi, Associate Professor, IT OBJECTIVES To meet the challenge of ensuring excellence in engineering education, the issue of quality needs to be addressed, debated and taken forward in a systematic manner. Accreditation is the principal means of quality assurance in higher education. The major emphasis of accreditation process is to measure the outcomes of the program that is being accredited. In line with this, Faculty of Institute of Aeronautical Engineering, Hyderabad has taken a lead in incorporating philosophy of outcome based education in the process of problem solving and career development. So, all students of the institute should understand the depth and approach of course to be taught through this question bank, which will enhance learner s learning process. PART A (SHORT ANSWER QUESTIONS) S. No Question Blooms Taxonomy Level 2 P a g e UNIT I 1 Define Programming Language. Knowledge 1 2 Difference between sentence and sentential form. Analyze 2 3 Define Syntax and Semantics. Knowledge 2 4 Differentiate between Syntax and Semantics. Analyze 1 5 Write BNF notation for i) For loop Understand 2 ii) if-else condition 6 Give grammars for simple assignment statements. Understand 2 7 Give un ambiguous grammar for if-then-else. Understand 2 8 Define Parse trees. Knowledge 2 9 Define Denotational semantics. Knowledge 1 10 Define Operational semantics. Knowledge 1 11 Define Axiomatic semantics. Knowledge 2 12 Differentiate compiler and interpreter. Analyze 2

13 Describe language recognizers. Understand 1 14 Describe generators. Understand 1 15 Distinguish simplicity and orthogonality. Analyze 2 UNIT II 1 Distinguish static and dynamic scoping. Analyze 2 2 Define associative arrays. Knowledge 2 3 Define guarded commands? Knowledge 2 4 Distinguish named type and structure type compatibility. Analyze 3 5 List the merits of sub range types. Knowledge 3 6 Differentiate union and enumeration. Analyze 3 7 Define data type. Knowledge 2 8 List the merits of type checking. Knowledge 2 9 Define user defined data type. Knowledge 2 10 Define widening and narrowing conversions? Knowledge 3 UNIT III 1 Define scope and lifetime of a variable. Knowledge 3 2 Differentiate shallow and deep binding. Analyze 3 3 Define subprogram. Knowledge 3 4 Define procedures. Knowledge 3 5 Define local referencing environment. Knowledge 4 6 Differentiate static and dynamic binding. Analyze 4 7 Define the phrase 'Adhoc-binding' Knowledge 4 8 Differentiate co-routines and subprograms Analyze 4 9 Define the phrase 'overloaded subprogram' Analyze 3 10 Discuss Generic sub programs. Understand 4 UNIT IV 1 Define an exception. Knowledge 4 2 Define a thread. Knowledge 4 3 Define concurrency. Knowledge 5 4 Define binary semaphore. Knowledge 5 5 Define monitors. Knowledge 5 6 Define mutual exclusion. Knowledge 5 7 Define deadlock. Knowledge 5 8 Define an abstract data type. Knowledge 5 9 Define logic programming language. Knowledge 5 10 Define data abstraction. Knowledge 6 UNIT V 1 Give the meaning of lazy evaluation mean. Understand 6 2 Define procedural abstraction. Knowledge 6 3 List few characteristics of Python language. Knowledge 7 4 Define functional language. Knowledge 7 5 Define imperative language. Knowledge 7 2 P a g e

S. No Question Blooms Taxonomy Level 6 Give the meaning of scripting language. Understand 6 7 List few examples of scripting languages. Knowledge 7 8 List keywords of Python language. Knowledge 7 9 List data types of Python language. Knowledge 7 10 Define the term separate compilation in Python. Knowledge 7 PART B (LONGANSWER QUESTIONS) S. No Question UNIT - I 1 Discuss language evaluation criteria and the characteristics that affect them. 2 List the potential benefits of studying programming language concept. 3 Explain syntax of a for statement in PASCAL using BNF notation and syntax graphs. 4 Explain syntax of declaration statement in PASCAL using BNF notation and syntax graphs. 5 Compute the weakest precondition for each of the following simple assignment statements and post conditions. a=2*(b-1)-1{a>0} b=(c+10)/3 {b>6} a=a+2*b-1 {a>1} X=2*y+x-1 {x>11} 6 Write BNF notation for following: a)for loop b)if-else condition c)structure definition 7 Define left most derivation. Prove that the following grammar is ambiguous. <program>->begin<stmt_list>end <stmt_list>-><stmt> <stmt>;<stmt_list> <stmt>-><var>=<expression> <var>-> A B C <expression>-><var>+<var> <var>-<var> <var> 8 State the given grammar is ambiguous. <assign> -><id>=<expr> <id>->a B C <expr>-><expr>+<expr> <expr>*<expr> (<expr>) <id> 9 List the three general methods of implementing a programming language. Blooms Taxonomy Level Understand 1 Knowledge 2 Understand 2 Understand 1 Apply 2 Apply 2 Knowledge 2 Knowledge 2 Knowledge 1 3 P a g e

10 Explain different aspects of the costs of a programming language. Understand 2 UNIT - II 1 Define heterogeneous array. Discuss the design issues of arrays. Knowledge 2 2 Explain in detail the design issues of arithmetic expressions. Understand 2 3 Discuss structural and name equivalence for types. Give an Understand 2 example of a language used for each approach. 4 Define a variable and what the attributes of a variable are. Knowledge 3 Elaborate on address of a variable. 5 Write a note on Boolean and relational expressions. Apply 3 6 Explain the different types of relational operators used in C, Ada Understand 3 and Fortran 95. 7 List the advantages and disadvantages of mixed mode arithmetic Knowledge 2 expressions? 8 Define array and record. Classify arrays based on storage Knowledge 2 allocation. What are the advantages and disadvantages of allocation memory during compilation time and run time. 9 Define static, fixed stack dynamic, stack dynamic, fixed heap Knowledge 2 dynamic and dynamic arrays. What are the advantages of each? 10 List the design issues of pointers. Explain. Knowledge 3 UNIT - III 1 Discuss generic subprograms in C++ and java. Understand 3 2 Explain about the concept of local referencing environment? Understand 3 3 Define subprograms. What are the advantages of subprograms? Knowledge 3 4 Discuss in detail about lifetime of a variable. Understand 3 5 Discuss the design issues of subprogram and its operations Understand 4 performed on them. 6 Explain different methods of parameter passing mechanisms to Understand 4 subprograms. 7 Explain about Co routines. 4 8 Explain the design considerations of parameter passing. Understand 4 9 Discuss about procedures and functions in subprograms. Understand 3 10 Define shallow and deep binding for referencing environment of subprograms that have been passed as parameters. Knowledge 4 UNIT IV 1 Describe how exception is handled in ADA with an example. Understand 4 2 Describe briefly about Semaphores. Understand 4 3 Describe briefly about Monitors. 4 Discuss Object Oriented Programming in SMALLTALK. 5 Write about goal statements and simple arithmetic in PROLOG. Apply 5 6 Define binary semaphore. What is counting semaphore? What are Knowledge 5 the primary problems with using semaphores to provide synchronization? 7 Explain the following terms: i. process synchronization ii. race condition iii. binary semaphores 4 P a g e

iv. MIMD 8 Explain different types of propositions present in logic programming. 9 Describe the cooperation synchronization and competition synchronization in message passing. 10 Discuss how dining philosopher s problem and producer consumer problem are solved using concurrency in Ada. UNIT V 1 Write about control constraints in Python. Apply 6 2 Write about data abstraction in Python. Apply 6 3 Write about data types and structures of LISP and LISP Apply 7 interpreter. 4 List the ways in which ML is significantly different from scheme. Knowledge 7 5 Describe the scoping rule in common LISP, ML and HASKELL. Understand 7 6 Explain the characteristics of scripting languages. Understand 6 7 Discuss in detail about the python primitive types. Understand 6 8 Explain about LISP functional programming language. Understand 7 9 Explain the features of scripting languages. Understand 7 10 Explain the concept of Pragmatics. Understand 7 PART C (PROBLEM SOLVING AND CRITICAL THINKING QUESTIONS) S. No Question Blooms Taxonomy Level 5 P a g e UNIT I 1 Give some reasons why computer scientist and professional Understand 1 software developers should study general concepts of language design and evaluation. 2 Write reasons for the statement: Exception handling is very Apply 2 important, but often neglected by programming languages. 3 Write reasons for the statement: A programming language can be Apply 2 compiled or interpreted. Give relative advantages and disadvantages of compilation and interpretation. Give examples of compiled and interpreted languages. 4 What does it mean for a program to be reliable? Apply 1 5 What are the three fundamental features of an object oriented Apply 2 programming language? 6 Describe some design trade-offs between efficiency and safety in Understand 2 some language you know. 7 Why is the Von Neumann bottleneck important? Understand 2 8 Which produces faster program execution, a compiler or a pure Knowledge 2 interpreter? 9 Why is type checking the parameters of a subprogram important? Knowledge 1 10 Explain the different aspects of the cost of a programming language? Understand 1

S. No Question Blooms Taxonomy Level 6 P a g e UNIT - II 1 List what advantages does java s break statement have over C s Knowledge 2 and C++ s break statement. 2 State whether static binding is more reliable or dynamic binding. Knowledge 2 Explain why. 3 List the design issues for Names with suitable examples. Knowledge 2 4 After language design and implementation [what are the four Analyze 3 times bindings can take place in a program?] 5 Describe a situation where a history-sensitive variable in a Understand 3 subprogram is useful? 6 What are the arguments for and against representing Boolean Understand 3 values as single bits in memory? 7 List the advantages of using control structures in any of the Knowledge 2 compiled programming languages. 8 Discuss the merits of guarded commands. Understand 2 9 Discuss the merits and demerits of short circuit evaluation. Understand 2 10 Discuss the importance of Named constants with suitable examples. Understand 3 UNIT - III 1 Compare the parameter passing mechanisms of ALGOL and Analyze 3 ADA. 2 State the importance of Local Referencing Environments with Knowledge 3 suitable examples. 3 Discuss about different parameter passing methods of Ada Understand 3 language. 4 In what way is static checking better than dynamic type checking. Analyze 3 5 What are the three general characteristics of subprogram. Understand 4 6 Which two languages allow multiple values to be returned from a Analyze 4 function? 7 In what way co-routines are different from conventional Analyze 4 subprograms? 8 What causes a C++ function to be instantiated? Knowledge 4 9 What are the three semantic models of parameter passing? Knowledge 3 10 Describe the way that aliases can occur with pass-by-reference? Understand 4 UNIT - IV 1 Discuss the reasons for using exception handlers in a programming Understand 4 language. What if there exist programming languages with no exception handlers. 2 Give the sample code to factorial of a number in PROLOG Understand 4 language. 3 Correlate the importance of logic programming languages over Analyze 5 functional programming languages. 4 List the merits and demerits of subprogram level concurrency. Knowledge 5 5 Discuss C++ parameterized ADT with suitable example. 6 Explain about Exception Propagation. Understand 4

S. No Question Blooms Taxonomy Level 7 Discuss various applications of logic programming languages. Understand 4 8 Explain the concept of object oriented programming in Smalltalk. Understand 4 9 Give an example for exception handlers in Ada language. 10 Explain the design issues related to Data abstraction UNIT - V 1 Write features of Haskell that makes very different from schema. Apply 6 2 List the ways in which ML is significantly different from scheme. Knowledge 6 3 Record the advantages of Python scripting language over other Knowledge 7 scripting languages 4 Give example of Python code to find the roots of quadratic Understand 7 equation 5 Discuss the concept of pragmatics in scripting languages. Understand 7 6 Write the python code to print first ten natural numbers. Apply 6 7 Write the python code to print factorial of a given number. Apply 6 8 Write the python code to print prime numbers between the given Apply 7 range. 9 Write the python code to find the given number is even or odd. Apply 7 10 Write the python code to print Pascal triangle. Apply 7 Prepared by: Mrs. B.Dhanalaxmi, Associate Professor, IT HOD, IT 7 P a g e