fork(1) download
  1. #include <stdio.h>
  2.  
  3. int toto(char *a, char *b){
  4. int counter = 0;
  5. while(*a++ == *b++) {
  6. printf("Count %d\n", ++counter);
  7. }
  8. return(*a == 0 && *b == 0);
  9. }
  10.  
  11. int main(void) {
  12. char a[] = "abc";
  13. char b[] = "abc";
  14. printf("%d\n", toto(a, b));
  15. // your code goes here
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 4560KB
stdin
Standard input is empty
stdout
Count 1
Count 2
Count 3
Count 4
0