help with C. I have a problem with C.
Can anyone tell me how to print out an array, in alphabetical, or numerical order?
Say, for example, that you had made a dice rolling game, that assigns 6 random numbers to a single-dimension array. How would you print out the result of each dice roll in ascending, or descending order?
What if you wanted to 'printf', an array of names in alphabetical order?
I can't think of a way to do this, except to use loads 'n' loads of 'strcmp()' functions! lol
I would really appreciate any help you could give.
Thanx. :rock: |