C Program Pass Array to Function
Turn Mobile View Off
by Dinesh Thakur

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.

Problem statement:
This is C program that asks user to show how to pass a value on the array through function.

  1. Declaring the variables.
  2. Using functions.
  3. Using loop statements.
  4. 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);
void main()
         int a[5],b[5],c[5],i;
         printf("Enter the Elements of First List :");
         printf("The Elements of First List are : ");
         void read(int c[],int i)
            int j;
         void dis(int d[],int i)
            int j;
                 printf("%d ",d[j]);

Pass Array to Function

Dinesh Thakur is a Technology Columinist and founder of Computer Notes and Technology Motivation. Turn Mobile View Off