GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MEMREV(3) C Programmer's Manual MEMREV(3)

memrev - reverse an array in place

#include <publib.h>
void *memrev(void *block, size_t elsize, size_t elnum);

memrev will reverse an array, by swapping the contents of its elements.

memrev returns its first argument.

To reverse an integer array one might do the following.


int array[4] = { 1, 2, 3, 4 }; memrev(array, sizeof(array[0]), 4);
This will result in the array being { 4, 3, 2, 1 }.

publib(3), strrev(3), memshuffle(3)

Lars Wirzenius (lars.wirzenius@helsinki.fi)
C Programmer's Manual Publib

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.