+ 1

Can we use 'rand()' to generate random characters??

i want to call random characters from a to c can i do so with the rand() function?

22nd Dec 2017, 2:56 PM
Ahmad Al Batsh
Ahmad Al Batsh - avatar
1 ответ
+ 3
char a='a'+rand()%26; - random letter from English alphabet. Read a bit about the ASCII table.
22nd Dec 2017, 3:39 PM
Petr Leliaev
Petr Leliaev - avatar