hey, i've got (in my eyes) this weird little problem:
no matter what day I input it always returns weekday.Code:#include <stdio.h> int main() { char day[10]; printf("give a day: "); scanf("%s", day); if ((day == "saturday") || (day == "sunday")) { printf("\nIts weekend\n"); } else { printf("\n its a weekday"); } }
some got an idea how this happens because i really dont.
thanx