# VTU Previous Question Papers BE-CS 3rd Semester Data Structures with C Dec 2010 To score the better mark in the Data Structures with C semester exam, you must solve the previous exam Paper. It will give you information about the important chapters and concepts to be covered in all chapters.

Here we are providing you the complete guide on VTU CSE 3rd Semester Data Structures with C Question Paper Dec 2010.

## VTU CSE 3rd Semester Data Structures with C Question Paper Dec 2010

You must have Data Structures with C Question Paper along with the latest Computer Science 3rd sem Syllabus to enhance your semester exam preparation.

Here you can check the VTU CSE 3rd Semester Data Structures with C Question Paper Dec 2010

PART-A

1 . a. What is a pointer? How do you declare and initialize the pointers? How do you access the

value pointed to t>y a pointer?

b. What is static and dynamic memory allocation? Explain with examples, the dynamic memory allocation functions.

c. What is the output of the following code?

int num ={ 3,4,6,2,1 };

int *p = num; int *q =num + 2;

int *r = &num[l];

Printf(“%d %d”, num, *(num + 2));

Printf(“%d %d”> *(p + 1));

Printf(“%d %d,v *(q + 1));

Printf(“%d %d5V*r, *(r+1));

2 .a. Explain the following string functions, with examples:

i) STRTOK ii) STRCMF iii) STRTOL iv) STRSTR

b. Write a C program to represent a complex number, using structure and multiply 2 complex numbers.

3. a. Define stack. List the operations on stack. Write the C implementation of these operations.

b. Implement reversing a string, using a stack in C.

4. a. Write an algorithm for evaluating a valid postfix expression. Trace thesame on 1 2 3 + * 3 2 1 —

b. What is the advantage of circular queue over linear queue? Write C routines for inserting and deleting an element from the circular queue.

PART -B

5. a. What is recursion? Write recursion function for finding maximum of n numbers. (08 Marks)

b. Briefly explain the structures of different types of linked lists. Write a C function to count number of elements present in a singly linked list.

6 .a. How can an ordinary queue be represented, using a singly linked list? Write C functions for linked implementation of ordinary queue insertion and deletion.

b. Write a C program to perform the following operations on doubly linked list:

i) Insert a node

ii) Delete a node.

7. a.What are binary trees? Mention different types of binary trees and explain briefly. (06 Marks)

b. Write C functions for the following tree traversals:

i) Inorder

ii) Preorder

iii) Postorder.

c.Write an algorithm to construct a binary tree for the inputs 14,15,4, 9, 7,18, 3, 5,16,4, 20,17, 9,14, 5 indicating a message for duplicate members. Draw the tree constructed by the above program.

8. Write short notes on:

a. Unions

b. Circular lists