fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. char m1[]="Vanille";
  5. char m2[]="Chocolat";
  6. printf("m1=%s et m2=%s\n",m1,m2);
  7. m1[7]='#';//je change le caractère fin de chaine par un dièse
  8. printf("m1=%s et m2=%s\n",m1,m2);//l'affichage de m1 va trop loins et empiète sur m2
  9.  
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 4408KB
stdin
Standard input is empty
stdout
m1=Vanille et m2=Chocolat
m1=Vanille#Chocolat et m2=Chocolat