mam taki oto kod:
#include<stdio.h>
2
3 int strcmp(char*, char*);
4
5 int main()
6 {
7 char *s = "4programmers", *t = "4programmer";
8
9 printf("%d\n", strcmp(s, t));
10 return 0;
11 }
12
13 int strcmp(char *s, char *t)
14 {
15 for( ; *s == *t; s++, t++)
16 if(*s == '\0')
17 return 0;
18 return *s - *t;
19 }
wynik:
115
What the Christ? Mój własny kompilator mnie nie słucha.