Data Structre Using C
Data Structre Using C
Prerequisites:
Knowledge of C programming.
Course Objectives
To study the concepts of derived data types and data structures such as linked list, stack,
queue, sorting and searching techniques.
Course Outcome
On successful completion of the course, the students will be able to attain below Course
Outcome (CO):
CL Linked Teaching
Course outcome
PO Hours
V Trees 08 - 07 15 22 15.39
VI Sorting, Searching and 10 - 08 20 28 19.23
Application of Data
Structures
Total 52 05 44 96 145 100
Pointers - Concept of pointers, Declaring and initializing pointers, Accessing variables using
pointers, Pointer arithmetic, Pointers and arrays, Pointers and character strings, Pointers and
functions, Pointer as a function argument, Pointers to function, Pointers and structures.
Introduction, Defining and opening a file, closing a file, Input / Output operations on files,
Error handling during I/O operations, Random Access to files, Command line arguments
Introduction, Basic concept, Binary tree, Binary tree representation, Binary tree traversal.
Sorting – Introduction, sorting techniques – selection sort, insertion sort, bubble sort, quick
sort (no implementation), merge sort (no implementation).
®Text books
1. Programming with ANSI-C, E. Balaguruswamy, Sixth Edition, Tata Mcgraw Hill for
Unit I and II
2. Data Structures using C, E. Balagurusamy, Tata Mcgraw Hill for Unit III,IV,V,VI
References
1. Programming with ANSI & Turbo C, Ashok Kamthane, Second Edition, Pearson
Education.
2. Let us C, Yashavant P Kanetkar, 14th Edition, BPB publication, ISBN
9788183331630
3. Data structures A Programming Approach with C Second Edition , PHI publication,
Dharmender Singh Kushwaha, Arun Kumar Misra.
4. Programming in C and Data Structure, P.B.Kotur, Sapna Book house
5. http://spoken-tutorial.org/tutorial-
search/?search_foss=C+and+Cpp&search_language=English
6. http://www.tutorialspoint.com/cprogramming/
7. http://www.indiabix.com/online-test/c-programming-test/
Note: the following activities or similar activities for assessing CIE (IA) for 5 marks (Any
one)
Student activity like mini-project, surveys, quizzes, etc. should be done in group of 3-5
students.
Course Delivery
The course will be delivered through lectures and Power point presentations/ Video
20 Blue books
three tests will
be computed)
Students
Student 1 to 6
05 Report
activities
Total 25
SE End End of the Answer scripts 1 to 6
100
E Exam course at BTE
Middle of the 1, 2, 3 Delivery
Indirect Assessment
Feedback forms
course of course
End of End of the 1 to 6
Students
Questions for CIE and SEE will be designed to evaluate the various educational
components (Bloom’s taxonomy) such as:
Sl. No Bloom’s Category %
1 Remembrance 10
2 Understanding 50
3 Application 40
Question
Question MARKS CL CO PO
no
1
2
3
4
Note: Internal choice may be given in each CO at the same cognitive level (CL).
Questio C
Question CL PO
n no O
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.
CO Question CL Marks
Define Pointer. Write its advantages and disadvantages. A
Explain the declaration and initialization of pointer variable with an U
example.
Discuss the use of address operator and indirection operator with U
pointers.
Explain the array of pointers with an example. U
Give the difference between call-by-value and call-by-reference U
methods.
Differentiate between pointers as function arguments and pointers to A
function.
How is a pointer to an array different from an array of pointers? Explain U
with an example 05
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
I
Explain free(). What are its advantages? U
Explain character pointer as an argument to a function with an example. U
Discuss pointer as a function argument. With an example explain call- A
by-reference method.
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 A
or not using pointer. 10
What are the advantages of pointer? Write a program using pointers to A
compute the sum of all elements stored in an array.
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() A
function.
How are static and dynamic memory allocations different? Write a A
program to sort 10 numbers using malloc().
What is a file? Explain how to open and close a file. U
Distinguish between the following functions: R
i. getc and getchar
8
10