heya.. I have programming exam tomorrow in C and i've messed up with some notes regrding arrays.. i'm looking for 2 programs basically now .. the first is that how can I display a array in accending order.. for example lets say
Code:
arr[6]={22,10,55,9,32,33}
how do I display this in accending or decending order? all I get from google etc is qsort and bubble sort .. however we are not allowed to use built-in function, i remember last time we did it was something comparision or something.. i totally forgot.. ill be thankful if you can write a program that will do it.. the 2nd thing im looking for is that "a 4 digit number is entered through a keyboard, write a program to reverse it" well i know about the char thing but there's some other logic its like number/100/1000 or something like that.. so if u know about it post it.. thanks .. also i'm confused about array swapping.. like if i have 2 arrays as follows
Code:
arr[]={2,3,4,5}
and
brr[]={3.4.5.6}
how do i swap their values, like brr should go to arr and arr value should be stored in brr.. i remember the TEMP thing but dunno how exactly to do it, ill be thankful if u can help.. its 9:49 pm here and i have exam tomorrow at 12:15 PM .. and i'll sleep in the next hour so plz hurry and thanks in advance