24CSE24
DATA STRUCTURES USING C
QUESTION BANK
MODULE 1 PROGRAMMING ESSENTIALS
10 MARKS
1. Illustrate the structure of C program with suitable example.
2. Explain the bitwise and conditional operator with suitable example for each
3. Explain the concept of operator associativity and precedence with example program
4. What are unformatted Input and Output functions with syntax and example?
5. Explain the following decision making statements
i. Simple if
ii. Nested if else
6. Explain the following conditional statements
i. If else
ii. else if ladder
7. Difference between conditional operator and if else statement
8. Explain the switch case with its syntax, flowchart of syntax and example program.
9. Write a C program for an arithmetic calculator using switch case.
10. Explain the different types of loops with its syntax and flow chart of syntax.
11. Different types of exit controlled and entry controlled loop.
12. Explain the nested for loop with its syntax, flow chart of syntax and example
program.
13. Explain the different uncontrolled statements.
14. Difference between break and continue.
15. Write a c program for quadratic equation
16. Armstrong number program.
17. Explain the different C tokens
5 MARKS
1. Explain the basic datatype with its size, keyword, format specifier, syntax, example
for each.
2. Explain any two preprocessor directives with an example.
3. Explain the identifier and rules for naming the identifiers with example.
4. Explain the assignment operators with suitable example.
5. Explain the arithmetic operator with suitable example.
6. Explain the relational operator with suitable example.
7. Explain the logical operator with suitable example.
8. Explain the increment and decrement operator with suitable example.
9. Expression evaluation
2*4**2/3+4
3/4*7-6+3
10. Write a C program for eligibility of voting using conditional operators.
11. Write a C program for given number is odd or even
12. Write a C program greatest among two number.
13. Explain the formatted input and output function with syntax and example program.
14. Write a c program to find the given year is leap year or not.
15. Explain goto statement with suitable example.
16. Explain the typedef and enum with suitable example program.
17. Explain local and global variable with example program.
18. Difference between while and do while
19. Write a C program to find the greatest among three numbers.
20. Write a C program to find the factorial of a given number.
21. Write a program to find the sum of first n natural numbers.
22. Write a C program to add the digits of the given integer.
23. Reverse the n digit integer.
24. Print the following pattern using nested while loop.
25. Check the given number is palindrome or not.
MODULE 2 ARRAY, FUNCTION AND POINTERS
10 MARKS
1. 1D array definition, declaration and initialization.
2. 2D array definition, declaration and initialization.
3. Write C program for Multiplication of two matrices.
4. Explain the components of function with a suitable example.
5. Explain the different types of User Defined functions with example program for each
type.
6. Write a C program of bubble sort using function.
7. Write a C program for maximum element from an array.
8. Explain the concept of recursion using factorial as example program.
9. Write a C program for minimum element from an array.
10. Write a C program for Fibonacci series.
11. Write c program to print the prime numbers from 1 to N.
5 MARKS
1. Write a C program to take and print N elements in an array.
2. Write a C program to find the sum of all elements in an array.
3. Write a C program to find the element in an array using linear search.
4. Write a C program to perform the addition of two matrices.
5. Write a C program to find the transpose of a matrix.
6. Explain the function with its syntax, flowchart of syntax and example program.
7. Explain the build in function with suitable example.
8. Explain the function prototype with suitable example.
9. Write a C program to rotate the array by k position
10. Write a C program to delete the last element in an array.
11. Write a C program to insert an element to an array.
MODULE 3 STRUCTURES, UNION AND POINTER
10 MARKS
1. Define the structure with declaration, initialization with an example program.
2. Define the Array of Structure with syntax and example program.
3. Define nested structure with its syntax and example program.
4. Write a c program for student details using nested structure and array of structure.
5. Define union with declaration, initialization with an example program.
6. Structure Vs union
7. Explain the different types of pointer arithmetic with an example program.
8. Explain the concept of call by value and call by reference with example program for
each.
9. Write a C program to swap two variable using pointer.
10. Write a C program to add all the elements in an array using pointer.
5 MARKS
1. Explain the pointer to pointer with example program
2. Write a C program for student details like student name, dob, rollnumber using nested
structure.
3. Write a C program for employee details like employee_name, employee_id and
employee_doj using Nested structure.
4. Write a C program for student details like student name, rollnumber using array of
structure.
5. Write a C program for Book details like book name,book prize using array of
structure.
6. Write a C program for a student details using Structure.
7. Define pointer with syntax and example program.
MODULE 4 STACK AND QUEUE
10 MARKS
1. What is data structures? Explain the different types of data structures.
2. Write algorithms of different stack operations.
3. Write the code snippets of stack operations.
4. Write a c program for implementation of stack using array.
5. Write an algorithm for evaluation of postfix expression.
6. Write a c program for evaluation of post fix expression.
7. Write algorithms of different Queue operations.
8. Write the code snippets of Queue operations.
9. Write a c program for implementation of Queue using array.
10. Is stack FIFO or FILO ? justfy your answer.
11. Is Queue FIFO or FILO ? justfy your answer.
5 MARKS
1. Explain the representation of stack
2. Explain the representation of queue
3. Explain any two data structure.
4. Explain the different operations on stack
5. Explain the different operations on queue
6. Explain the representation of arithmetic expression.
7. Convert the arithmetic operator to post fix.
8. Convert the following infix to postfix expression
i. A*B+C/D
ii. 3+5*6/2-1
9. Draw flowchart for the following stack operations
i. Push
ii. Pop
10. Draw flowchart for the following queue operations
i. Enqueue
ii. Dequeue
MODULE-5 SEARCHING AND SORTING
10 MARKS
1. What is searching? Explain the different types of searching techniques.
2. Difference between linear search and binary search.
3. Write a C program to find an element from an array using linear search algorithm.
4. Write a C program to find an element from an array using Binary search algorithm.
5. Explain the concept of bubble sort with its algorithm
6. Write a C program to sort an array using bubble sort algorithm
7. Explain the concept of insertion sort with its algorithm
8. Write a C program to sort an array using insertion sort algorithm
9. Explain the concept of selection sort with its algorithm
10. Write a C program to sort an array using selection sort algorithm
5 MARKS
1. Difference between internal and external sorting with example program.
2. Steps to search an element using binary search algorithm
3. Explain the concept of internal sort with an example
4. Explain the concept of External sort with an example
5. Difference between bubble sort and insertion sort
6. Difference between insertion and selection sort
7. Difference between selection and Bubble sort.
8. Sort the given array of elements using bubble sort
34,55,65,76,32,24,35,22,12,39,94,73,43,21
9. Sort the given array of elements using insertion sort
34,55,65,76,32,24,35,22,12,39,94,73,43,21
10. Sort the given array of elements using selection sort
34,55,65,76,32,24,35,22,12,39,94,73,43,21