how to read characters separated by spaces in c language from file code example Example: how to read space separated words in c scanf("%[^\n]%*c", ref_string);