You are on page 1of 5

Roll No. .............................

BCA-06 (Bachelor of Computer Application)

Second Semester ,Examination 2012
Data Structure Through C Language
Time: 3 Hours

Max. Marks 60

Note: The Question paper has been divided in three sections- A,

Band C. Answers the Questions as per instructions given in each
Section A
(Long Answers Question)
Answer any two questions. Each question carries 15 Marks.
(2x 15 =30)


What is structure? Write appropriate structure definition and variable

declarations to store

following information about 100 students:

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.
(b) What is pointer? What are the uses of pointers in C?

Page 1


(a) What do you understand by Dynamic Memory Allocation? Explain any three
functions that support dynamic memory allocation.


(b) Write a C program to read ten integers and store them in an array using
pointers. Print their sum and average.

(a) What is a circular list? Explain with a diagram.

(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

(b) What is threaded binary tree? Explain right in and left in threaded binary trees.

Section B
Note: Answer any four questions. Each question carries 5 Marks.
1. Explain the working of a simple queue.

2. Compare linear linked list and double linked list, with diagrams.

3. What is string? How is a string declared and initialized?

4. Write a short note on homogeneous list.

5. List out the advantages and disadvantages of doubly linked list over single linked
6. What is stack? List and implement basic operation in stack using c.

Page 2

7. What is threaded binary tree? Explain right in and left in threaded binary trees.
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.


1. The data structure required to evaluate a postfix expression is

(A) queue
(B) stack
(C) array
(D) linked-list
2. The pre-order and post order traversal of a Binary Tree generates the same output. The
tree can have maximum
(A) Three nodes
(B) Two nodes
(C) One node
(D) Any number of nodes
3. The postfix form of A*B+C/D is
(A) *AB/CD+
(B) AB*CD/+

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:


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()


Page 5