Message from C, C++ discussions

January 2020

— I am using Do while loop but i gave it in the correct syntax didn't get out of the loop


int main()
char a,b;
printf("Enter the password : ");
if(a == "letmein")
printf("Access Granded");
printf("Access denaid \n");
printf("Do you want to continue..(Y/N)");
}while(b == "Y"||"y");
return 0;

— This is the code

— What is letmein

— %d is not char

— Just my password......😂

— %c

— Its true

— You need to use an array of chars, not a single char to use scanf
like here at the bottom

Message permanent page

— To read a string

— Yes.....thanks...guys...i got it....

— But we can do that also but this will print ASCII value of that character