C Program to Insert an Element in an Array

Here is the simple C program to insert an element in a one dimensional array.

The array should be in ascending order.

 

Output

Enter size of array:6
Enter the array in ascending order:
1 2 4 5 6 7

Enter element to insert:3

Array after inserting element:1 2 3 4 5 6 7

Leave a Reply

Your email address will not be published. Required fields are marked *