On 5/13/09 Wed May 13, 2009 4:48 AM, "Michael Alipio"
scribbled:
> I have a c code that looks like this:
>
> #include
>
> main (){
> char girl[] = "anna";
> char boy[] = "jude";
> stringcopy(boy, girl); /* copy boy to girl */
> printf("%s", girl);
>
> }
>
> void stringcopy(char *b, char *g)
On Wed, May 13, 2009 at 07:48, Michael Alipio wrote:
>
>
> I have a c code that looks like this:
And C isn't Perl, perhaps you should ask these sort of questions on a
C list or newsgroup[1]? Or maybe Stack Overflow[2]?
snip
> However if I replace the stringcopy call arguments with "jude", "anna
I have a c code that looks like this:
#include
main (){
char girl[] = "anna";
char boy[] = "jude";
stringcopy(boy, girl); /* copy boy to girl */
printf("%s", girl);
}
void stringcopy(char *b, char *g){
while ((*g++ = *b++) != '\0')
;
}
It prints fine...
However if I replace the stringcopy