NR221501 Principles Of Programming Languages B.Tech Question Paper : djriet.edu.in
Name of the College : Dasari Jhansi Rani Institute Of Engineering And Technology
University : JNTUK
Department : Computer Science And Engineering
Subject Code/Name : NR221501 – Principles Of Programming Languages
Year : 2008
Degree : B.Tech
Year/Sem : II/II
Website : djriet.edu.in
Document Type : Model Question Paper
Principles Of Programming Languages : https://www.pdfquestion.in/uploads/djriet.edu.in/2962-NR221501-PRINCIPLES-OF-PROGRAMMING-LANGUAGES-set1.pdf
DJRIET Programming Languages Question Paper
II B.Tech II Semester Supplimentary Examinations, Apr/May 2008 :
PRINCIPLES OF PROGRAMMING LANGUAGES :
(Computer Science & Systems Engineering)
Time: 3 hours
Max Marks: 80
Related : Dasari Jhansi Rani Institute Of Engineering And Technology 07A1EC01 C Programming & Data Structures B.Tech Question Paper : www.pdfquestion.in/2989.html
Set – I
Answer any FIVE Questions :
All Questions carry equal marks :
1. (a) Explain the features of object oriented programming.
(b) Write BNF description for arithmetic expressions which implements the Operator hierarchy of any imperative language. [6+10]
2. (a) Compare the FORTRAN computed GOTO with Pascal case statements especially in terms of reliability.
(b) Rewrite the following code segment using a loop structure in the following languages
i. Pascal
ii. Ada
k:=(j+13)/27;
loop:
if k > 10 then goto out
k:= k+1.2
I=3*k-1;
goto loop
out : …
Assume all Variables and constants are floating point type [6+10]
3. (a) What are the advantages and disadvantages of language supporting name equivalence and structural equivalence.
(b) Dynamic type binding is closely related to implicit dynamic variables. Explain their relation ship. [8+8]
4. (a) Explain the importance of scope in a programming language.
(b) How display is used during runtime. [8+8]
5. Discuss the general features of procedures and the various parameter passing mechanisms. [16]
6. (a) Discuss the data abstraction in MODULA.
(b) Describe abstract data types with suitable examples. [8+8]
7. Discuss how producer-consumer problem is solved in:
(a) concurrent-Pascal
(b) ADA. [8+8]
8. (a) Represent the following statements as a rule in PROLOG X is brother of Y if X is male, X parents are M (mother) and F (father) and Y parents are also same.
(b) Explain the following in PROLOG with examples.
i. fact.
ii. functor.
iii. conjunction.
iv. question. [8+8]
Set – II
Time: 3 hours
Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
1. How algorithm is different from flowchart? Write an algorithm and draw flowchart for finding greatest among three given numbers. [8+8]
2. What is a function? What are the different types of functions? Explain function with no argument and no return type with an example. [16]
3. Define an array. What are the different types of arrays? Explain. [16]
4. Compare arrays, structures and unions. [16]
5. (a) Write the syntax for opening a file with various modes and closing a file.
(b) Explain about file handling functions. [8+8]
6. What is the advantage of binary search? Write a program to search an element 30 in the given set of inputs { 12,15,18,30 } [16]
7. (a) Compare the advantages and disadvantages of doubly linked list over singly linked list.
(b) Implement a queue using linked list and write a ‘C’ routine to add elements from a queue. [8+8]
8. Explain about connected and non-connected graph and list the difference between them? [16]
Set – III
1. (a) Define Algorithm.
(b) What is the use of flowchart?
(c) What are the different steps followed in the program development? [3+3+10]
2. (a) Explain about call by value with an example.
(b) Write a program to generate Fibonacci series using with argument and return type. [8+8]
3. Write the syntax for declaring two – dimensional array write a program to access and print the array elements. [16]
4. How to copy one structure to another structure of a same data type, give an example? [16]
5. (a) Write the syntax for opening a file with various modes and closing a file.
(b) Explain about file handling functions. [8+8]
6. Write a program to sort the elements whose worst and average case are O(n log n). [16]
7. What is a singly linked list? Write a program to delete a node in front, rear and in a particular position and print the list. [16]
8. Write a ‘C’ program to implement recursive algorithm for a Binary Search Tree. [16]