Data Structure Using ‘C’
Assignment
1. Write a program to find the largest and smallest element in an array.
2. What is the difference between ++i and i++ in C?
3. Explain the use of break and continue in loops.
4. Write a C program to find the factorial of a number using recursion.
5. Write a program to reverse an array without using another array.
6. Implement a program in C to check whether a string is a palindrome or not.
7. Write a program to sort an array using Bubble Sort.
8. Explain the working of Quick Sort algorithm. Using this array
5,3,2,1,5,9,7,10,6
9. Explain all the types of operators in C with examples.
10. What is a loop? Explain for, while, and do-while with differences.
11. What is an array? How is a 1D array different from a 2D array?
12. What is the difference between a string and a character array in C?
13. What is a function in C? Why do we use functions?
14. Write a program in C to find the factorial of a number using a function.
15. What are compound assignment operators in C? Give examples (+=, -=, *=, /=,
%=).
16. What are the main features of C language? Explain briefly.
17. Explain the use of header files in C. Why do we write #include <stdio.h>?
18. What is the difference between local and global variables?
19. Explain constants in C. How are they different from variables?
20. What are keywords in C? Give at least 10 examples.