| | |
Reverse a pointer to a set of integers
![]() |
•
•
Join Date: Oct 2008
Posts: 9
Reputation:
Solved Threads: 0
here:
The second for loop is to get back a reversed ptr.
C Syntax (Toggle Plain Text)
int temp[ptr_size]; int ptr_size2 = ptr_size; for (i=0;i<ptr_size;i++) { temp[i] = ptr[ptr_size2--]; } for (i=0;i<ptr_size;i++) { ptr[i] = temp[i]; }
The second for loop is to get back a reversed ptr.
![]() |
Similar Threads
- Pointers (archived tutorial) (C++)
- What am I doing wrong. (C++)
- Linked Lists Help C++ (C++)
- data sorts in reverse order!! help!! (C)
- Pointers (C++)
Other Threads in the C Forum
- Previous Thread: Vector Calculator issues (I got the code)
- Next Thread: Starting with "C"
| Thread Tools | Search this Thread |
adobe api array arrays binarysearch calculate char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators intmain() iso kernel kilometer km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat opensource openwebfoundation owf pattern pdf performance pointer posix power probleminc program programming pyramidusingturboccodes read recursion recv recvblocked repetition research scanf scheduling segmentationfault send shape socketprograming socketprogramming stack standard strchr string suggestions systemcall test unix urboc user variable voidmain() wab win32api windows.h





