samedi 28 février 2015

C programming language :if statements are not working correctly with characters

I'm trying to make this program say good but it says okay instead though I made the variable value the same of the if test value



#include <stdio.h>
#include <stdlib.h>

int main()
{
char history[200];
history == "NY school";

if(history == "NY school")
{
printf("good");
}
else{printf("okay");}
return 0;
}

Aucun commentaire:

Enregistrer un commentaire