I have data format below
int : int \t string
for example,
11:11 long long long description.
I use
sscanf(line, "%d:%d\t%s\n", &num1, &num2, &description)
but it only cuts the first word from the description.
How should I proceed the data from line to receive all characters in description with spaces?
The format specification %s will read a string, until a whitespace character is found. If you want to read all characters up to \n you can do %[^\n]. That says read characters as long as the character is not in the set that contains the newline character. Note that the trailing \n is not read by it. So the final solution would be: