Ok newbie here. I got a question. I'm trying to write a program that reads a string from someone and gives an if-then-else result. Here's what I've done, can someone point out what I'm doing wrong?
PHP Code:
#include <stdio.h>
void main(void)
{
char name; //input variable
char f; //input variable
char lname; //input variable
char mname; //input variable
printf ("What is your First Name?");
f=getchar();
if (f=="fantim") || (f == "Fantim") || (f == "FANTIM"))
printf ("What is your middle name?");
scanf ("%d", &mname);
if ((mname == "mi") || (mname == "Mi") || (mname =="MI"))
printf ("What is your last name?");
scanf ("%d", &lname);
Of corse this isn't where the code stops, but this is where my problems are coming in.