KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a string (unsigned char) and i want to fill it with only hex characters. my code is unsigned char str[STR_LEN] = {0}; for(i = 0;i<STR_LEN;i++) { sprintf(str[i],"%x",rand()%16); } Of course, when running this I get segfaulted
Tags (comma-separated)
Save Edits
Cancel