Semester : SEMESTER 4
Subject : Functional Programming
Year : 2018
Term : APRIL
Branch : MCA
Scheme : 2016 Full Time
Course Code : RLMCA 262
Page:1
E EC410 Pages: 2
Reg No. Name:
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
SECOND SEMESTER (Second Year Direct) &
FOURTH SEMESTER MCA (Regular) DEGREE EXAMINATION, APRIL 2018
Course Code: RLMCA262
Course Name: FUNCTIONAL PROGRAMMING
Max. Marks: 60 Duration: 3 Hours
PART A
Answer all questions, each carries 3 marks. Marks
1 Explain Tail Recursion and Recursion Trees. (3)
How can we use Functions as a value? Explain with suitable example. (3)
What are Inverse Functions? Explain with suitable examples. (3)
What do you mean by Lazy Evaluation? (3)
What is an Enumerated Data Type? What are its uses? (3)
What are Type Classes? Explain the usage of any three type classes. (3)
പ ൭൧൧. ~ تم
Does Haskell provide any structure in which you can accommodate different (3) values
belonging to different types? If so, name and explain how to use it.
8 Write the lists generated by the following Haskell list comprehensions. (3) 1) [x*3 | x <
- [1..10]] 11) Ly | +< - [1..5],y<-[1..x]] iii) [x | x< [൭,൦..] ]
PART B
Each question carries 6 marks.
9 a) What are the different data structures commonly used in computer (6) programming?
(Explain any 3 data structures)
OR
b) What are the various data types used commonly in programming (6) languages?
(Explain any 4 types with examples)
10 a) — Explain Functional Composition and the usage of Auxiliary Functions. (6)
OR
b) i) Explain Pattern Matching in Function definitions with suitable examples.
(3) ii) Explain the use of Strict Functions and Non-strict
Functions (3) 11 a) Explain any 4 operations defined over a List with
examples. (6)
Page 1 of 2