hello i have been trying to write a code that allows me to exit a program at any point during that program by typing the word exit.
you will have to bare with me i am extremely new to this.
Code:
#include <stdio.h>
int main(void)
{
char x[20];
char person[20];
printf("Please type your name: ");
scanf("%s", person);
if ((person) == "x")
{
printf();
exit(1);
}
printf("After reading the January 1, issue of that demonstrated the Altair 8800, %s called the creators of the new\n", person);
}
this is what i have come up with so far, any suggestions on why this is not working?