In this program user ask to pass array to function. User declare the variables along with functions for process to pass array like void read (), void dis (). Arguments also declared within function to pass value. Array type variable contains the array elements within. User asks to enter the value as regarding. And then user call the function for passing value to array in a function user declares for loop for to print a value. The other function is been also call and loop statement also declare for another printing method. And display on the screen.
This is C program that asks user to show how to pass a value on the array through function.
- Declaring the variables.
- Using functions.
- Using loop statements.
- Display result on the screen.
Here is C source code for passing array to function. Output of this program shown below.
void read(int *,int);
void dis(int *,int);
printf("Enter the Elements of First List :");
printf("The Elements of First List are : ");
void read(int c,int i)
void dis(int d,int i)