Você está na página 1de 5

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

BCA-06 (Bachelor of Computer Application)


Second Semester ,Examination 2012
BCA-06
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
sections.
Section A
(Long Answers Question)
Answer any two questions. Each question carries 15 Marks.
(2x 15 =30)
1.

(a)

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.
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.

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

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

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/+
BCA-06

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

Você também pode gostar