-
Benoît Legat a rédigé
The only tricky ones were Assembleur/src/gdb.c C/S3-src/strcat.c because they output something like 1 2 3 with for(i=0;i<n;i++) {printf("%d ",i);} printf("\n"); What I commonly do in that case is for(i=0;i<n;i++) {printf("%d%c",i,(i+1==n)?'\n':' ');} but that can be considered as tricky for LSINF1252 so I've written for(i=0;i<n;i++) {printf(" %d",i);} printf("\n"); which outputs 1 2 3
Benoît Legat a rédigéThe only tricky ones were Assembleur/src/gdb.c C/S3-src/strcat.c because they output something like 1 2 3 with for(i=0;i<n;i++) {printf("%d ",i);} printf("\n"); What I commonly do in that case is for(i=0;i<n;i++) {printf("%d%c",i,(i+1==n)?'\n':' ');} but that can be considered as tricky for LSINF1252 so I've written for(i=0;i<n;i++) {printf(" %d",i);} printf("\n"); which outputs 1 2 3
Chargement en cours