Bca 06
Bca 06
Bca 06
Max. Marks 60
(a)
Name, st_no, gender, date of birth and marks in three subjects S1, S2, S3.
Date of birth should be a structure containing fields day, month, and year.
10
(b) What is pointer? What are the uses of pointers in C?
BCA-06
5
Page 1
2.
(a) What do you understand by Dynamic Memory Allocation? Explain any three
functions that support dynamic memory allocation.
10
(b) Write a C program to read ten integers and store them in an array using
pointers. Print their sum and average.
3.
(b) Show the detailed contents of stack for a given postfix expression 623 +- 382 /
+*2 & 3 + and evaluate the expression.
4. (a) Define recursion. Give at least three differences between iteration and
recursion.
(b) What is threaded binary tree? Explain right in and left in threaded binary trees.
10
Section B
Note: Answer any four questions. Each question carries 5 Marks.
4x5=20
1. Explain the working of a simple queue.
2. Compare linear linked list and double linked list, with diagrams.
5. List out the advantages and disadvantages of doubly linked list over single linked
list.
6. What is stack? List and implement basic operation in stack using c.
BCA-06
5
5
Page 2
7. What is threaded binary tree? Explain right in and left in threaded binary trees.
5
8. Write a function that accepts a string and return 1 if the string is palindrome else 0
if string is not palindrome without using any built in function.
Section C
Note: Answer all questions. Each question carries 01 marks.
10x1=10
Page 3
(C) A*BC+/D
(D) ABCD+/*
4. Quick sort is also known as:
(A) merge sort
(B) heap sort
(C) bubble sort
(D) none of these
5. A queue is a,
(A) FIFO (First In First Out) list.
(B) LIFO (Last In First Out) list.
(C) Ordered array.
(D) Linear tree.
6. The largest element of an array index is called its
(A) lower bound.
(B) range.
(C) upper bound.
(D) All of these.
7. In order to get the contents of a Binary search tree in ascending order, one has to
traverse it in:
BCA-06
Page 4
(A) pre-order.
(B) in-order.
(C) post order.
(D) not possible.
8. Which data structure is used for implementing recursion?
(A) Queue.
(B) Stack.
(C) Arrays.
(D) List.
9. A global variable is a variable
(A) declared in the main ( ) function.
(B) declared in any function other than the main ( ) function.
(C) declared outside the body of every function.
(D) declared any where in the C program.
10. Which is not dynamic memory allocation function?
(A) malloc()
(B) free()
(C) alloc()
(D) calloc()
BCA-06
Page 5