Answers for "taking array as a parameter in c proram"

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

Code answers related to "taking array as a parameter in c proram"

Code answers related to "C"

Browse Popular Code Answers by Language