#include <stdio.h>
#include <stdlib.h>
int main()
{
char *s = (char*)malloc(sizeof(char)*5);
printf("Enter:");
scanf("%5s",s); //s == abcde
if(s == "abcde")
printf("Yes");
else
printf("NO");
return 0;
}
I want to check the user given input as above. but it always gives the output as 'NO'. what did i do wrong?