Logic:-
We are using Malloc and realloc (reallocated memory during runtime ) after getting -1 stop inserting numbers and then use an any sorting algorithm and print the element of the array. if you don't know any sorting algorithm then you have to check here
Output:
Enter Infinite Numbers and (-1 To Stop Reading)
12
09
23
78
45
56
25
58
96
52
-1
Ascending Order Is Given Below
9 12 23 25 45 52 56 58 78 96
need an explanation for this answer? contact us directly to get an explanation for this answer