I am passing the one element while I want to pass all the elements without a pointer. How to pass an array by value in C
Code:#include<stdio.h>
void Display(int a);
int main()
{
int Arra[] = { 2, 3, 4 };
Display(Arra[1]); //Passing array element only.
return 0;
}
void Display(int a)
{
printf("%d", a);
}