hey guys why dont you use pointers???
i tried it works fine with me
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <alloc.h>
void fun(char **arr)
{
printf("%s\n",arr[0]);
printf("%s\n",arr[1]);
}
void main()
{
char **arr;
clrscr();
strcpy(arr[0],"1asdf");
strcpy(arr[1],"2sdf");
fun(arr);
getch();
}- [c-prog] Passing character arrays to functions Rick
- [c-prog] Re: Passing character arrays to functions Nico Heinze
- Re: [c-prog] Passing character arrays to functions Mickey Mathieson
- Re: [c-prog] Passing character arrays to functio... Knowledge Seeker
- Re: [c-prog] Passing character arrays to functio... Rick
- [c-prog] Passing character arrays to functio... sunil_h_v
- Re: [c-prog] Passing character arrays to... Thomas Hruska
- Re: [c-prog] Passing character arra... Mickey Mathieson
- Re: [c-prog] Passing character arrays to... Brett W. McCoy
- [c-prog] Compiler warnings [was: Passing cha... Nico Heinze
