C Program to increment the array by one and print incremented array
#include <stdio.h>void incrementArray(int[]);
int main()
{ int i; int array[4] = {10, 20, 30, 40}; incrementArray(array); for (i = 0; i < 4; i++) printf("%d\t", array[i]); return 0; } void incrementArray(int arr[]) { int i; for (i = 0; i < 4; i++) arr[i]++; }
OUTPUT:-
-------------------------------
11 21 31 41
--------------------------------