Semester : SEMESTER 2
Subject : Problem Solving using C
Year : 2018
Term : MAY
Branch : COMPUTER SCIENCE
Scheme : 2020 Full Time
Course Code : BCS 2B 02
Page:2
^ ~ ~~ ~ ~ ~~~ »ه02 ಣು
ತ್ತ
12.
-13.
14,
15.
16,
का:
18.
19.
20.
21.
22.
23.
25.
26.
27.
28.
29.
30.
31.
2 D 43199
Part B
Answer all questions.
Each question carries 2 marks.
Distinguish between Data abstraction and Encapsulation.
List out the different uses of scope resolution operator.
Distinguish between PUSH and POP operations.
Write a recursive procedure to generate the Fibonacci sequence.
What do you mean by collision resolution ?
(5 x 2= 10 marks)
Part C
Answer any five questions.
Each question carries 4 marks.
Compare private, public and protected data.
Write a C++ program to add two complex numbers.
Write a C++ program to read a list of names from a file and output the list.
Explain about the type conversion from one derived type to another derived type.
Explain the application of a stack in implementing recursive functions calls.
Explain how insertion and deletion takes place in a circular queue.
Write a program in C++ to search an element using binary search. ٭
What is hashing ? Explain the different methods used to perform hashing.
(5 x 4 = 20 marks)
Part D
Answer any five questions.
Each question carries 8 marks.
Explain different types of inheritance with syntax and example.
Create a class Matrix. Implement the matrix operations addition and multiplication using operator
overloading.
Explain the role of virtual functions in implementing runtime polymorphism.
Write short notes on :
(a) Static member functions. (b) ‘This’ pointer.
Write an algorithm to convert an infix expression to postfix form using stacks.
Write short notes on :
(a) Merge sort algorithm. (b) Implementation of Doubly Linked List.
Write a program to insert a node in a sorted singly linked list.
Write an algorithm to sort a list of numbers using Quick Sort. Explain the algorithm with the help
of a given list of numbers.
(5 x 8 = 40 marks)