Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <time.h>
- # include <stdio.h>
- # include <stdlib.h>
- int
- main(void)
- {
- /* You can change the length of the password */
- unsigned short int length = 8;
- /* Seed number for rand() */
- srand((unsigned int) time(0));
- /* ASCII characters 33 to 126 */
- while(length--) {
- putchar(rand() % 94 + 33);
- }
- printf("\n");
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement