ARRAYS
REVISION QUESTION SET
1. What is an array in C?
2. From which index does an array start in C?
3. Write the general syntax for declaring an array.
4. What is the index of the last element in an array of size n?
5. Name the loop most commonly used to access array elements.
6. Define one-dimensional array with an example.
7. What is a two-dimensional array?
8. Write the syntax to declare a 2-D array.
9. How are array elements stored in memory?
10. What is a string in C language?
11. Differentiate between variable and array.
12. What is the difference between char name[] and char name[][]?
13. Explain row and column in a 2-D array using an example.
14. What happens when an array index goes out of bounds?
15. Why is '\0' important in strings?
16. Write a C program to read and display elements of a 1-D array.
17. Write a program to find the sum of elements of an array.
18. Write a program to find the largest element in an array.
19. Write a program to display elements of a 2-D array (matrix).
20. Write a program to read and display a string using fgets().