Alternatively, you could use <math.h> and its absolute value function.
Code:
/* Make sure to
#include <math.h>
*/
int index;
for (index = 5; index >= -5; index--)
printf ("%d", abs(index));
actually i was thinking to manipulate bits.
Manipulating bits would be overly complicated and not at all portable as different systems will store negative values in different ways, usually with either Two's Complement, One's Complement, or Sign Magnitude. Even if you bothered to analyse how your computer is storing them, it still wouldn't work on every other computer.