0

but now when i generate a password it has weird characters in it

Because there are unused bytes in the array that contain random junk characters. Initialize the whole array with 0s before doing anything.

char password[5 + 5 + 5 + 5 + 1] = {0}; // 4 Upper, 4 Lower, 2 Num, 2 Symbols

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.