You're online now.

Hurray! you are online now.

User login system in c programming language

In this program, we create a login system program which takes username and password from the user.

    int main(){
    	char username[20];
    	char userpassword[20];
    	int i;
    	printf("Enter the User Name : ");
    	printf("Enter the Password : ");
    	printf("\n\n****\tEnter Any Key to Continue\t****");
    	if(!strcmp(username, "exampleuser") && !strcmp(userpassword, "example123")){
    		printf("\n\n****\tLogin Successful\t****");
    		printf("\n\n****\tProvided Information Incorrect. Please Provide Right Information!!\t****");
    	return 0;
  • Take username and password from the user.
  • After taking the value from the user then compare the value is correct or not.
  • If value is correct then “ Login successfull ” otherwise.
  • “ Invalid Credentials "
🖤 0
Buy me coffee ☕



No comments here...