Re: Any way to take a word as input from stdin ?



On Fri, 26 Sep 2008 13:39:47 +0100, Ben Bacarisse wrote:


Then, as a learning exercise, I'd implement get_input (I'd probably
call it get_words but that is not important) and sort the array and
print it "outside" (probably in main). That gives you more learning!

well ,thats what I am doing. I don't see any difference in your idea. I
even have a function name i mind: printf_input(..) and also I will free()
in main() too, as input char* to get_input(...) is also created in main().





--
www.lispmachine.wordpress.com
my email is @ the above blog.
Gooogle Groups is Blocked. Reason: Excessive Spamming

.



Relevant Pages

  • Re: sort array
    ... >...And yes, I'm learning for an exam,. ... >after fixing the i-1 thing, doing the cards trick, algorithm stil ... which can be smaller then the array. ... >what do I have to fix in order to make it sort? ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Any way to take a word as input from stdin ?
    ... arnuld writes: ... call it get_words but that is not important) and sort the array and ... That gives you more learning! ... for that sort of design. ...
    (comp.lang.c)
  • Re: "Sorting" assignment
    ... And many others prefer to call partition exchange because "quicksort" ... bin B depending on whether it is greater than, ... If the array is already sorted, this means that you end up ... attempt to sort them. ...
    (comp.programming)
  • Re: A Fast sorting algorithm for almost sorted data
    ... far my compressor has potential but is nowhere near ready. ... It does however make heavy use of sorting. ... which I am currently calling Run sort. ... entire selected run can be added to the sorted output array. ...
    (comp.compression)
  • A Fast sorting algorithm for almost sorted data
    ... which I am currently calling Run sort. ... entire selected run can be added to the sorted output array. ... public class RunSort implements Comparator ... public static void sort(Comparable a, int start,int end) ...
    (comp.compression)