what is wrong with my if statement
i cant execute this query, and i would like some help
Code:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
main()
{
char user,pass,run;
scanf("%c",&user);
scanf("&c",&pass);
if(user=="joker" && pass=="t");
(
printf("right input")
)
else
(
printf("incorrect password");
)
}
strings can compare...............
Quote:
Originally Posted by
joker_tony
i cant execute this query, and i would like some help
Code:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
main()
{
char user,pass,run;
scanf("%c",&user);
scanf("&c",&pass);
if(user=="joker" && pass=="t");
(
printf("right input")
)
else
(
printf("incorrect password");
)
}
Hai
String comparision method is wrong...strings can be compared only using standard
library function strcmp(string1, string2)