Код: Выделить всё
#include
#include
int main(){
//passing strings directly
printf("%d\n", strcmp("ahmad", "fatema"));
//passing strings as pointers
char *a= "ahmad";
char *b= "fatema";
printf("%d\n",strcmp(a,b));
return 0;
}
Код: Выделить всё
-1
-5
Подробнее здесь: https://stackoverflow.com/questions/277 ... -as-litera