0
Correct the code
#include<stdio.h> int main() { char a; printf("Enter your pass"); scanf("%c",&a); if(a== 'Balaji') { printf("password is correct"); } else { printf("Password is wrong"); } }
3 Answers
+ 5
Agree with Martin Taylor. You have to use character array to use it as a string and also use strcmp for comparing by including the string header file.Also for a string you have to use double quotation not single quotation mean not 'Balaji' ,it should be "Balaji"
https://code.sololearn.com/cA15a630a25a
0
In place of chat rewrite it as String. And make necessary changes for it
0
Thanks