Whats wrong with my code?
#include <stdio.h>
main()
{
char x[10];
printf("Enter [True/False] : ");
scanf("%s", x);
if(x=="true")
printf("Great..\n");
else
printf("What's wrong?\n");
}
result:
root@invecta:~# gcc -o result if.c
root@invecta:~# ./result
Enter [True/False] : true
What's wrong?
root@invecta:~#