Skip to content

Commit 9e030ac

Browse files
committed
.
1 parent 0f269e6 commit 9e030ac

File tree

1 file changed

+3
-1
lines changed
  • Self written C library functions

1 file changed

+3
-1
lines changed

Self written C library functions/strcmp.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#include <stdio.h>
2+
23

34
int my_strcmp(char* a, char* b){
45
return (*a == *b && *a == '\0') ? 0 : (*a == *b) ? my_strcmp(++a, ++b) : 1;
6+
57
}
68

79
int main(void) {
@@ -15,4 +17,4 @@ int main(void) {
1517
printf("Strings are not identical");
1618
}
1719
return 0;
18-
}
20+
}

0 commit comments

Comments
 (0)