I\'d like to do something like printf(\"?\", count, char) to repeat a character count times.
printf(\"?\", count, char)
count
What is the right format-string to accomplish
#include #include void repeat_char(unsigned int cnt, char ch) { char buffer[cnt + 1]; /*assuming you want to repeat the c character 30 times*/ memset(buffer,ch,cnd); buffer[cnt]='\0'; printf("%s",buffer) }