string(pointer to function)
Code:
#include <stdio.h>
void split_name(char *a[], char *b[], char *c[]);
int main(void)
{
static char *Name[2]={"Justin","Barnes"};
char *firstname[1];
char *secondname[1];
split_name(Name,firstname,secondname);
}
void split_name(char *a[], char *b[], char *c[])
{
int i=0;
do
{
b[1] = a[i];
++i;
c[1] = a[i];
}while(i>0);
printf("%s %s",*b,*c);
getchar();
}
My question is sould i use a <- to take the valuable from a[i] to b and c .but then i get an error because of 1 and when i leave it like this i get an compile error soo im wondering how could i take the teo names from array a to b and c..?