So, I am not to sure if I should be commenting since I don't know C enough to give an opinion but maybe try setting it to a variable like x and change x
#include <stdio.h>
/* read a white space delimited string into cstr
sz (greater than one) is the size of the character buffer
therefore, allow no more than sz-1 characters */
int read_str( char* cstr, size_t sz )
{
char format[16] ;
sprintf( format, "%%%ds", sz-1 ) ;
return scanf( format, cstr ) ;
}
#define INBUFFERSIZE 100
int main()
{
char in[INBUFFERSIZE] ;
read_cstr( in, INBUFFERSIZE ) ;
puts(in) ;
}