passing ~ pass particular element of array in function in c language.
■ passing particular element of array in function
■》Input->
#include<stdio.h>
#include<conio.h>
void display(int);
void main()
{
int arr[5]={1,2,3,4,5};
display(arr[2]);
getch();
}
void display(int a)
{
printf("the element of array is=\n");
printf("%d",a);
}
■》output->
3
Comments
Post a Comment