+ 2
I'm new in c, what is wrong here? I can't sort numbers...
4 Answers
+ 2
Logic is correct but you need to know how the functions and prototypes are created in c. Then calling function by pass by value and pass by reference..
First you declared functions inside main. But you need to add it out side main as functions are independent separate block of code to perform a task.
Then your swap function is working by pass by value so any changes in function don't reflect back in array..
Instead pass arr, index values to swap then in function swap array values by indexes. .
but you need loops, inner loop need n times iterations
Try again and reply..
Hope it helps..
+ 1
Thank you. I'm still trying to get a hold of functions. So going back to fundamentals again I guess...
0
Try again.. You can reply if , still you have trouble with code then.
You're welcome,..
0
Jayakrishnađźđł please help me againđ„đ