Data Structures using C COMPUTER SCIENCE 3RD SEMESTER MODEL QUESTION PAPER


Data Structures using C  COMPUTER SCIENCE 3RD SEMESTER MODEL QUESTION PAPER

FORMAT OF I A TEST QUESTION PAPER (CIE)

Test/Date and Time

Semester/year

Course/Course Code

Max Marks

Ex: I test/6 th weak of sem 10-11 Am

I/II SEM

 

 

20

Year:

 

Name of Course coordinator :                                                                                                                 Units:  

CO’s:        

Question

no

Question

MARKS

CL

CO

PO

1

 

 

 

 

 

2

 

 

 

 

 

3

 

 

 

 

 

4

 

 

 

 

 


Note: Internal choice may be given in each CO at the same cognitive level (CL).

MODEL QUESTION PAPER (CIE)

Test/Date and Time

Semester/year

Course/Course Code

Max Marks

Ex: I test/6 th week of sem 10-11 AM

IV SEM

Data Structures Using C

 

20

Year: 2015-16

Course code:15CS41T

Name of Course coordinator :

Units:1,2 Co: 1,2

Note:   Answer all questions

Questio n no

Question

CL

C O

PO

1

How is a pointer to an array different from an array of pointers?

Explain with an example                                                                                            (5)

U

1

1,2

2

Write C program to swap two numbers using pointers.                                                                                            (5)

OR

Give the difference between call-by-value and call-by-reference methods.

A

1

1,2

3

Explain different file accessing modes.

OR

With an example, explain how to handle errors during I/O operations

U

2

1,2

4

Write a program to copy contents of one file to another.

A

2

1,2


 Format for Student Activity Assessment

DIMENSION

Unsatisfactory 1

Developing 2

Satisfactory 3

Good 4

Exemplary 5

Score

Collection of data

Does not collect any information relating to the topic

Collects very limited information; some relate to the topic

Collects some basic information; refer to the topic

Collects relevant information; concerned to the topic

Collects a great deal of information; all refer to the topic

3

Fulfill team’s roles & duties

Does not perform any duties assigned to the team role

Performs very little duties

Performs nearly all duties

Performs all duties

Performs all duties of assigned team roles with presentation

4

Shares work equally

Always relies on others to do the work

Rarely does the assigned work; often needs reminding

Usually does the assigned work; rarely needs reminding

Does the assigned job without having to be reminded.

Always does the assigned work without having to be reminded and on given time frame

3

Listen to other Team mates

Is always talking; never allows anyone else to speak

Usually does most of the talking; rarely allows others to speak

Listens, but sometimes talk too much

Listens and contributes to the relevant topic

Listens and contributes precisely to the relevant topic and exhibit leadership qualities

3

 

 

 

TOTAL

13/4=3.25=4


 
Diploma in Computer science & Engineering
IV- Semester
Course Title: Data Structures Using C
Time: 3 Hours Max Marks: 100
PART-A
Answer any SIX   questions. Each carries 5 marks. 5X6=30 Marks
1. Explain fseek() and ftell() functions.
2. Define Data structures. Mention different types of data structures.
3. Write the advantages and disadvantages of a Linked List.
4. Define stack. Explain how to represent a stack in C.
5. Write a note on dequeue.
6. Define the following a)internal node b) sibling c) degree of the tree d) depth of a tree
e) path
7. Define the following a) root node b) leaf node c) level of tree d) child node e)parent node.
8. Write a recursive C program to find the GCD of two numbers.
9. List the application of Linked List.

PART-B
Answer any SEVEN full  questions each carries 10 marks. 10X7=70 Marks
1. a)Define Pointer. Write its advantages and disadvantages. b)Explain pointer to structure with example.
2. List and explain Dynamic Memory allocation functions in C.
3. Write a program to copy contents of one file to another. Use command line arguments to specify the file names.
4. Write the c functions to perform insert at front and delete operations on Singly Linked List.
5. Define Circular Linked List. Give its c representation.
6. Write C program to implement push and pop operation of stack.
7. Define Priority queue. Write the C implementation Priority Queue.
8. Construct a binary tree for the following values and traverse the tree in preorder, inorder and postorder:
46, 76, 36, 26, 16, 56, 96
9. Write a c program to implement Binary Search.
10. List the application of stack. Write an algorithm to convert infix to postfix expression.




 
  MODEL QUESTION BANK
Diploma in Computer Science & Engineering IV Semester
Course Title: Data Structures Using C


CO

Question

CL

Marks

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I

Define Pointer. Write its advantages and disadvantages.

A

 

 

 

 

 

 

 

 

 

 

05

Explain the declaration and initialization of pointer variable with an

example.

U

Discuss the use of address operator and indirection operator with

pointers.

U

Explain the array of pointers with an example.

U

Give the difference between call-by-value and call-by-reference

methods.

U

Differentiate between pointers as function arguments and pointers to

function.

A

How is a pointer to an array different from an array of pointers? Explain

with an example

U

Explain pointers and array using example.

U

Explain how an array can be passed to a function?

A

Explain in brief the different parameter passing mechanisms.

A

Explain pointer to structure with example.

A

Write C program to swap two numbers using pointers.

A

Define Dynamic Programming in C and its advantages.

A

Give the difference between malloc() and calloc() functions.

U

Explain free(). What are its advantages?

U

Explain character pointer as an argument to a function with an example.

U

 

 

 

 

 

 

 

10

Discuss pointer as a function argument. With an example explain call-

by-reference method.

A

With an illustration program explain pointers to structures.

A

With an illustration program explain pointers to arrays.

A

Write a program to illustrate pointer arithmetic’s.

A

Write C program to compare 2 strings to check whether they are equal

or not using pointer.

A

What are the advantages of pointer? Write a program using pointers to

compute the sum of all elements stored in an array.

A

Explain Dynamic Memory allocation in C using memory map.

A

List and explain Dynamic Memory allocation functions in C.

A

Writ a program to illustrate memory allocation using malloc() function.

A

Writ a program to illustrate memory allocation using calloc() function.

A

Writ a program to illustrate reallocation of memory using realloc()

function.

A

How are static and dynamic memory allocations different? Write a

program to sort 10 numbers using malloc().

A

 

What is a file? Explain how to open and close a file.

U

 

Distinguish between the following functions:

i.    getc and getchar

R

 

 

 

 

 

 

II

ii. printf and fprintf

 

05

With an example, explain how to handle errors during I/O operations.

U

Explain fseek() and ftell() functions.

U

Differentiate between following functions:

i.      feof and ferror

ii.     printf and fprintf

iii.   getc and getw

U

 

 

 

10

Write a program to copy contents of one file to another.

A

Use command line arguments to specify the file names.

U

List and explain Input /Output functions of file.

U

Explain different file accessing modes.

U

 

 

 

 

 

 

 

III

Define Data structures. Mention different types of data structures.

R

 

 

 

 

 

05

What are primitive data types? Explain

U

Distinguish between linear and non-linear data structures.

R

Explain data structure operations.

U

Define Linked List. Mention the different types of Linked list.

R

Explain the representation of a Linked List in memory with a help of an

illustration.

U

Explain the operations that are performed on Singly Linked List.

U

Write the advantages and disadvantages of a Linked List.

U

Compare Singly Linked List with Circular Linked List.

U

Compare Singly Linked List with Doubly Linked List.

U

Write the c functions to perform insert at end and display operations on

Singly Linked List.

A

 

 

 

10

Write the c functions to perform insert at front and delete operations on

Singly Linked List.

A

Write the c functions to perform insert at a given position operations on

Singly Linked List.

A

Define Circular Linked List. Give its C representation.

A

Define Doubly Linked List. Give its C representation.

A

 

 

 

 

 

 

IV

Define stack. Explain how to represent a stack in C.

U

 

 

05

Explain push and pop operations of stack.

A

Define queue. Explain the sequential representation of queue

U

Write a note on queue.

U

Define Priority queue. Differentiate ascending ord descending priori

queue

A

Write C program to implement push and pop operation of stack.

A

 

 

 

10

Define queue. List and explain types of queues.

U

Write a program to implement queue in C.

A

Write an algorithm to perform Queue insertion and deletion.

A

Define Circular queue. Write the C implementation Circular Queue.

A

Define Priority queue. Write the C implementation Priority Queue.

A

Define Double Ended queue. Write the C implementation Double Ended

Queue double.

A

 

Define Binary tree. Explain the method of representing binary trees.

U

 

 

 

 

 

 

 

V

Explain with an example how to perform deletion

A

 

 

 

 

05

operation on a binary tree.

 

Define the following a) root node b) leaf node c) level of tree d) child

node e)parent node.

R

Define the following a)internal node b) sibling c) degree of the tree d)

depth of a tree e)path

R

Construct a binary tree for the following data,

16, 3, 8, 11, 1, 6, 9, 14, 2, 10, 17, 7 13

A

Explain Strictly Binary tree and Complete Binary Tree, with an

example.

A

Explain Perfect Binary tree and Balanced Binary Tree, with an example.

A

What is binary tree traversing? Explain type of traversal with example.

A

 

 

10

Develop a recursive algorithm to traverse a binary tree in the following

order i.e Inorder, Preorder and Post order.

A

Construct a binary tree for the following values and traverse the tree in preorder, inorder and postorder:

46, 76, 36, 26, 16, 56, 96

A

Define tree traversal. List and explain types of tree traversal.

A

 

 

 

 

 

 

 

 

 

 

 

VI

Explain with an example the working of the merge sort.

A

 

 

 

 

 

 

05

Explain the concept of straight selection sort.

U

Write a note on simple insertion sort.

U

Explain Quick sort with example.

A

Explain Bubble sort with an example.

A

Explain the concept of Linear Search.

U

Explain the concept of Binary Search.

U

Write a recursive C program to find the GCD of two numbers.

A

Write a recursive C program to find the Factorial of a number.

A

What is recursion? Explain the properties of recursive definition

U

List the application of Queues.

A

List the application of Linked List.

A

List the application of Trees.

A

Develop a C program to implement bubble sort method.

A

 

 

 

 

 

 

10

 

Write a program to implement Insertion sort.

A

Write a program to implement Selection sort.

A

Write a c program to implement Linear Search.

A

Write a c program to implement Binary Search.

A

List the application of stack. Write an algorithm to convert infix to

postfix expression.

A

Give the postfix and prefix forms for the following expression.

(a / b) * c – (d + g) $ f

U

Give the postfix and prefix forms for the following expression.

a $ b * c – d + e / f / (g + h)

U

Evaluate the given postfix expression with the stack content,

3+4*2/(9-5) ^ 4

U


Popular Posts