Password generator in C