so to summarize this question,my goal is to print "works!\n". Whenever I manually give the char pointer action variable the word "exit" (the comment line) , I get my output.Whenever I don't (and instead give it through the command line arguments when I run a.out) I dont get it (which essentially means that the "if" condition fails). Any ideas why this happens?
int main(int argc,char *argv[]){
char *action;
action = argv[1];
/*action = "exit";*/
printf ("%s\n",action);
if (action == "exit"){
printf ("works!\n");
}
}