Answers for "how to take an array as a parameter in c"

C
13

take array as input in c

int size=5;
int array[size]; // array of size=5;

for(i=0;i<size;i++){
   scanf("%d",&array[i]);
                }
Posted by: Guest on November-05-2020
0

c program to pass entire array into a function

#include <stdio.h>
void display( char c)
{
  printf("%c ", c);
}
int main()
{
printf("Welcome to DataFlair tutorials!\n\n");
int i;
char vowels[] = {'a', 'e', 'i', 'o', 'u'};
for (i=0; i<5; i++)
{
display(vowels[i]);
}
return 0;
}
Posted by: Guest on April-02-2022
1

passing an array to a function in c

...
int arr[M][N];
...
void randomArrayFill(int arr[M][N]) {
//body
}
Posted by: Guest on September-08-2021

Code answers related to "how to take an array as a parameter in c"

Code answers related to "C"

Browse Popular Code Answers by Language