السلام عليكــم ورحمـة الله وبركاتــه ،،
question: write two arrays in main one of them is of type int , the other is of type char and pass them to void functions to print.
note: you must use pointer(or address) in functions.
#include<stdio.h>
#include<string.h>
void int_array(int list[] , int a)
{
int i;
for(i=0 ; i<a ; i++)
printf("%d ",list);
}
void char_array(char word[] , int length)
{
int j;
for(j=0 ; j<length ; j++)
printf("%c", word[j]);
}
int main()
{
int q[]={50,-3,-100,3000}, a=4,b;
char *s[]={"kuwait","home"};
int_array(q , a);
printf("\n");
b=sizeof(s);
char_array(*s ,b );
getch(stdin);
return 0;
}