title: Varying number of elements in scanf()
body: <p>How do I tell my program how to vary how many elements are to be read by <code>scanf</code>? I want it to read each character in a string, and the length of the string may vary from one character to a hundred characters. I know I can do <code>scanf("%c%c%c%c...")</code> a hundred times but is there an easier way to do this?</p>