Program in C that accepts username and password and performs login function
Write a program in C that perform login operation. The program will accept username and password as a string from the user. The valid username should be “user” and the valid password should be “default”. If either of the username or password is incorrect then it should display the appropriate message. If username and password entered is correct, then it should display the message “User successfully logged in…”. Here is the C program: #include<stdio.h> #include<conio.h> #include<string.h> void main() { char *username; char *password; clrscr(); printf(“Enter the username: “); gets(username); printf(“\nEnter the password: “); gets(password); if(strcmp(username, “user”) == 0){ //username verification...