Hey guys :)
After a year of c++, teacher's announced we'll be learning C standard as well, starting with next semester.
So anyway, I've been looking through some examples and exercises in a book and found 2 problems I can't seem to solve. (At least not in C).
The first one goes like this: From a text file, read a string of rational numbers only once and determine the longest sequence of equal numbers, as well as the position at which that sequence begins.
Second: Read a string of numbers from a file and rearrange them so that the pair numbers will be at the beginning of the string and the impair at the end. The order of those substrings must be identical to the original string.
Now for the life of me I can't figure out the position thing in the 1st poblem and in the 2nd, not sure how should I move the numbers around efficiently.
Also, I don't know how to read elements from a file using C nor am I sure how I "print" them.
Any support would be great, hope I'm not bothering you too much ^_^