Password Pattern Maker in C Programming

CWC
1 Min Read

Password Pattern Maker in C Programming – Program explanation

At first, I declared three char array names alp, num and sym. Then I initialize some value with 0. After that I used for loop up to 8. In this for loop, I rendered three random value and assign them in x, y and z. Then I printed that index value of our declared array and printed the value.

#include<stdio.h>
#include<time.h>

int main (void)
{
    srand (time (NULL));

    char* alp  = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
    char* num = "0123456789";
    char* sym = "`~!@#$%^&*()_-+={}[]\\|:;\"'<>,.?/";

    int i = 0, x = 0, y = 0, z = 0;

    printf ("Your Password: ");

    for (i = 0; i < 8; i++)
    {
        x = (rand () % 51) + 1;
        y = (rand () % 9) + 1;
        z = (rand () % 31) + 1;
        printf ("%c%c%c", alp[x], num[y], sym[z]);
    }

    return 0;
}

Free Download Password Pattern Maker in C Programming Source Code

Password-pattern-maker-in-c-programming

 

Share This Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

English
Exit mobile version