#include <stdio.h>
#include <string.h>
int main(){
char name[20];
printf("Whats your name: ");
fgets(name,20,stdin);
printf("hello, %s", name);
if(strcmp(name, "john")==0){
printf("hello john.");
}
return 0;
}
im a java developer an newly in C . why strcmp not working. help me please