C programming - sscanf for tkens separated by space

Viewed 777

I'm currently trying writing a program using C (very new to C - only been learning it for 2 weeks), and I wanted to get a string of input from the user by stdin, in which the string has a char, followed by 2 floats (each has space in between). Example would be: "y 2.1 1.1". My question is how can I obtain and store the 3 inputs, while making sure the first is a char, and the following two inputs are floats?

2 Answers
Related