hi another question. i managed to do the coding for my declaration of function and this is what i did:
Code:
void strcopy(char dest[], char src[4]);
int main(void)
{
char src[]="YES", dest[]={1};
int i;
strcopy(dest, src);
printf("%s\n", dest);
system("pause");
return 0;
}
void strcopy(char dest[4], char src[4])
{
int i;
for(i=0; i<4; i++)
dest[i]=src[i];
}
i actually modified to give my
one element of dest's array. the function still works fine. but i just want to find if my understanding is correct... like say if i bring this dest[]={1} into my function and copy with a 4element array.. it means my number of elements in dest will be able to change.