Practice Questions
1. What are strings? Write various string operations.
2. Define array as a data structure. Explain the types of arrays.
3. Explain 2D arrays? Demonstrate how they are declared and initialised, also show the
memory allocation to 2D arrays with the help of a diagram.
4. Explain strcmp(), strcpy(), strlen() functions.
5. Solve the problem of matrix addition with the help of C program.
6. Construct a program in C to count the total number of alphabets, digits and special
characters in a string.
7. Analyze how binary search is efficient. Implement it by using a C program.
8. List step by step process of bubble sort using an example. WAP in C to implement it.
9. Define data structure. Explain the classification of data structure.
10. Define Abstract Data Type along with example. What is the difference between ADT and
data structure?
11. What are different type of Asymptotic Notations. Define their significance analysis of
algorithms.
12. Explain the Complexity of an algorithm? Compare and contrast time and space
complexity.
13. What is a stack data structure? Write algorithm for the different operation performed on
stack.
14. What is a queue data structure? Write algorithm for insertion and deletion in single queue.
15. Solve the given expression in postfix notations by using stack a + b * c / (a + b * c)
16. List advantage of using circular queue. Write and algorithm for insertion in circular
queue.
17. What is the time complexity for merge sort and quick sort?
18. Define searching. List any 3 differences between Linear search and Binary search
techniques.
19. Define string? Write a program to find the length of a string using pointers.
20. Write a program to find the GCD of two numbers using recursion
21. What is an Array? List and explain the different operations that are performed on arrays.
22. Construct an algorithm to create an array of size NXN and to print the matrix.
23. Define a 2 dimensional array. Write a program to find the product of a 2 dimensional
array.
24. List the disadvantages of using arrays. Write a program in C to print odd numbers in an
array.
25. List the difference between Stack and array.
26. What is Time and Space complexity? Explain Asymptotic notation in detail.
27. Evaluate the following postfix expressions assuming (A=1, B=2, C=3 a) AB+C-BA+C^-
28. Outline the drawback of linear queue. How this drawback can be eliminated?
29. How are data structures classified? Explain with a neat diagram.
30. What are Stack operations? Explain with neat diagrams.
31. Simplify an algorithm to implement a stack of size N using an array. The elements in the
stack are to be integers. The operations to be supported are PUSH, POP, and DISPLAY. Take
into account the exceptions of Stack overflow and underflow.
32. Explain in detail all the operations of a linear queue with an example and neat diagram.