Skip characters while reading integers using scanf() in C
Let suppose, we want to read time in HH:MM:SS format and store in the variables hours, minutes and seconds, in that case we need to skip columns (:) from the input values.
There are two ways to skip characters:
- Skip any character using %*c in scanf
- And, by specifying the characters to be skipped