This article is a void pointer example.
The example C code is included in Ted Jensen's tutorial, it is a bubble sort algorithm ,page 47.
The C code. The result
A simple void* pointer example. At this example we will rewrite the well known swap() function with the help of void* pointers. So swap() is now able to swap any data type and not only integers.
The C code The result |