0
Can someone help me why this code don't copy the second array to first?
#include<stdio.h> #include<string.h> void copy(char *oldyear,char *newyear){ int i=0; while(*oldyear=NULL){ (*oldyear+i)==(*newyear+i); i++; *newyear++; *oldyear++; } } int main() { char s1[]="Welcome to 2018"; char s2[]="Welcome to 2019"; puts(s1); puts(s2); void copy(char s1[],char s2[]); puts(s1); puts(s2); return 0; }
5 Antworten
0
= use for assigment.
== use for comparison.
Re check the code if there any operator used in a wrong way. Its pretty easy to spot
0
Really? That is the just problem of this code ? If it is,this is so annoying 😂
0
Thank you if I can't edit correctly I will write again here. Happy new year you too :))
0
I can't edit correctly still. Do you have chance to write full code and send to me ?
0
Thank you a lot . Good night . Marry christmas again :)))