how to make sscanf work like scanf?

but at the while loop word is getting the word "My" in each loop. In case of scanf, when it reads from the stdin, each time it is called it reads and advances the read pointer. But I guess for sscanf the behavior is different. What I want is sscanf to act like scanf and read and advance the file pointer? Am I missing anything or this is not possible with sscanf? In that case how to accomplish this?

PS: Does anyone know why firefox is showing "behavior" as a wrong spelling while I am typing here in this text area?

> PS: Does anyone know why firefox is showing "behavior" as a wrong spelling while I am typing here in this text area?
You install the dictionary for your flavour of English.
So things like colour are spelled correctly ;)

> PS: Does anyone know why firefox is showing "behavior" as a wrong spelling while I am typing here in this text area?
You install the dictionary for your flavour of English.
So things like colour are spelled correctly ;)

Great. Your solution worked perfectly.

I have a related problem which I tried to do in 2 ways - 1 in your approach and another in my approach. But sadly I don't know why none of this worked.

The problem is that the input is a sequence of numbers on a line. More specifically a number of datasets like this:

3
1 7 6 4
5
3 8 0 8

where each dataset consists of a pair of lines. first line is one single number on a line by itself. In the second line, there is a sequence of numbers the length which is unknown. so obviously (as occurred to me), I should take the second line as a string and then do some while loop until it exhausts. So I did it the following:

But I am not sure why the first approach didn't work. Because I used that approach before pretty long time ago which I recalled today.

Of course we could take your approach literally and get the token words and then use atoi to convert them to numbers. But why would %d not work?

Moreover, is there any elegant way of doing this like using variable arguments list (va_list) or so. I mean a sequence of unknown length of numbers and has to be got the numbers. As you see, EOF or NULL would not work because we have to determine the boundary of data sets which is not known.

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...