Anyone know's how to sort odd and even number with array in c language ? If you know please show me how to do it


11/8/2019 4:14:15 AM


5 Answers

New Answer


I will give you basic idea of it, you have to code it yourself. See, create an array with some elements(odd and even both) Now in a for loop check every element like this a[i] % 2 == 0, cuz if that condition is true then it's even number else it's odd number. Code it 🤓


One way, while checking even or odd, if it comes even assign that into other array, if it is odd assign it into another array. So you have separate arrays for even and odd While printing print one odd, one even element using loops.. Be sure to stop printing, continue other if array sizes are not same.. You can get while coding... Hope this helps some...


Thank you though


But how to print it out with this order (even odd even odd, ...)


Well, thank's