Get premium membership and access revision papers, questions with answers as well as video lessons.
Got a question or eager to learn? Discover limitless learning on WhatsApp now - Start Now!

Ccs 301: Principles Of Programming Languages Question Paper

Ccs 301: Principles Of Programming Languages 

Course:Bachelor Of Science In Computer Science

Institution: Maseno University question papers

Exam Year:2016



SECTION A:ANSWER ALL QUESTIONS
Question One(30 marks)
a)Distinguish between the following pairs of concepts as used in computer programming languages: (10mks)
i)Static binding and dynamic binding
ii)Syntax and semantics
iii)Abstraction and polymorphism
iv)Object and class
v)Denotational semantics and axiomatic semantics
b)Give appropriate definition of function overloading ,then use a java programming language syntax to demonstrate the concept of function overloading (2mks)
c)Study the following grammar for arithmetic expression represented in Backus Naur Form(BNF) then answer the questions that follow.
--------> |
--------> |
-------> identifier|number|-|()
------>+|-
------>*|/
i)Identify terminal symbols, nonterminal symbols and start symbol. (2mks)
ii)Draw a parse tree for the expression 3+4*5(8-6). (4mks)
d)Discuss functions and procedures as data abstraction mechanisms in programming languages,then use appropriate examples in either java or C++ language to explain how functions and procedures are declared and invoked to enable them perform their specific tasks. (8mks)
e)Discuss the importance of arrays and records as data structures in programming languages. (4mks)

SECTION B:ANSWER ANY TWO QUESTIONS
Question Two(20 marks)
Discuss any four programming language paradigms. Provide at least two examples of programming languages in each paradigm. (20mks)

Question Three(20 marks)
a)Differentiate between static semantics and dynamic semantics. (2mks)
b)Discuss three approaches that can be used to represent dynamic semantics. (12 mks)
c)Explain three types of data abstraction that can be supported by programming languages. (6mks)

Question Four(20 marks)
a)State and briefly explain any eight design principles to be examined when designing a programming language. (8mks)
b)Provide a detailed discussion of Object oriented paradigm,including the fundamental concepts used and examples of specific languages using this paradigm.(8mks)
c)Discuss the security issues relating to running code on alien machines.(4mks)

Question Five(20 marks)
a)State the importance of control structures in programming languages to explain how the three main categories of control structures are used in programming. (12mks)
b)Use relevant examples to explain the difference between Backus Naur Form (BNF) and Extended Backus Naur Form(EBNF) as formalisms for representing context free grammars. (4mks)
c)In a given programming language, a variable is defined as a sequence of one or more characters starting with a letter.Provide a full definition of a variable using BNF.(4mks)






More Question Papers


Popular Exams



Return to Question Papers