sami sam

sami sam

  • NA
  • 40
  • 29.4k

spot my mistakes please

Aug 13 2012 3:02 AM

Can one please spot my mistake, I know I've been a annoying user but the reason why I am because my knowledge of programming was zero till I started the course at my uni and I am doing much better than before for sure but more works needed for me.


#include <stdio.h>
#include <string.h>
char s1[80], s2[80];
int i;
int main (){
strcpy(s1, "cat");
i=0;
while(s1[i]!='\0'){
s2[i]=s1[i];
i++i
}
s2[i]=\0;
}

Answers (5)