Write a c program which takes password from user





Write a c program which takes password from users

C source code for password:

#include<stdio.h>
#define MAX 500

int main(){

    char password[MAX];
    char p;
    int i=0;

    printf("Enter the password:");
   
    while((p=getch())!= 13){
         password[i++] = p;
         printf("*");
    }

    password[i] = '\0';

    if(i<6)
         printf("\nWeak password");

    printf("\nYou have entered: %s",password);

    return 0;
}

Sample output:
Enter the password:*******
You have entered: fgt67m,





1. Write a c program to convert decimal number to hexadecimal number.
3. Write a c program to convert octal number to decimal number.
4. Write a c program to convert octal number to hexadecimal number.
5. Write a c program to convert hexadecimal number to decimal number.
6. Write a c program to convert hexadecimal number to octal number.
8. Write a c program to convert binary number to hexadecimal number.
9. Write a c program to convert binary number to octal number.
11. Write a c program to convert hexadecimal number to binary number.
12. Write a c program to convert octal number to binary number.
14. Write a c program to convert centigrade to fahrenheit.
Post a Comment