C Array is a collection of variables belongings to the same data type. We can store group of data of same data type in an array.
EXAMPLE FOR C ARRAYS
- int arr[10]; // integer array
- char arr[10]; // character array i.e. string
Arrays are divided in two categories.
- One-dimensional array
- Multi-dimensional array
In this exercise we will focus on one-dimensional and multi-dimensional array. We will learn to implement and use arrays in C programming language using following examples.
- Write a C program to print all negative elements in an array
- Write C program to count total number of negative elements in array
- Write a C program to read and print elements of array
- Write C program to find sum of all elements of an array
- Write C program to count even and odd elements in an array
- Write C program to find maximum and minimum element in array
- Write C program to insert an element in array
- Write C program to print all unique element in an array
- Write C program to sort an array in ascending order
- Write C program to copy all elements of one array to another
- Write C program to count number of each element in an array
- Write C program to delete all duplicate elements from an array
- Write C program count total duplicate elements in an array
- Write C program to merge two sorted array
- Write C program to put even and odd elements of array in two separate array
- Write C program to find reverse of an array
- Write C program to left rotate an array
- Write C program to right rotate an array