Arrays are one of the most important concepts in C programming. A one-dimensional (1D) array is a collection of elements stored in contiguous memory locations and can be accessed using an index. Mastering arrays is crucial for improving problem-solving skills and writing efficient programs.
To help beginners and programming enthusiasts, we have compiled 15 must-practice C programming questions on 1D arrays. These exercises will improve your understanding of array manipulation, traversal, searching, and sorting techniques.
1D Array Exercise Questions in C
Here are 15 well-structured questions for practice:
Basic Level
- Write a C program to input and print elements of an array.
- Write a C program to find the sum and average of elements in a one-dimensional array.
- Write a C program to find the maximum and minimum elements in an array.
- Write a C program to count the total number of even and odd elements in an array.
- Write a C program to reverse the elements of an array.
Intermediate Level
- Write a C program to search for an element in an array using linear search.
- Write a C program to count the number of occurrences of a given element in an array.
- Write a C program to copy all elements of one array into another array.
- Write a C program to insert an element at a specific position in an array.
- Write a C program to delete an element from a specific position in an array.
Advanced Level
- Write a C program to sort an array in ascending order using the Bubble Sort algorithm.
- Write a C program to merge two one-dimensional arrays into a third array.
- Write a C program to rotate an array to the left by a given number of positions.
- Write a C program to find the second largest and second smallest elements in an array.
- Write a C program to check whether two arrays are equal or not.
Why Practice 1D Array Questions?
✅ Enhances problem-solving skills by understanding array traversal, manipulation, and searching techniques.
✅ Strengthens your logic for programming competitions and technical interviews.
✅ Prepares you for real-world applications like database indexing, data sorting, and optimization algorithms.
✅ Improves coding efficiency with hands-on practice in array-based problem-solving.
Arrays are fundamental in C programming, and mastering them can help in competitive programming and technical job interviews. These 15 C programming practice questions on 1D arrays will help you build a strong foundation in handling arrays efficiently.
So, start coding today and sharpen your programming skills! 🚀

