#include <stdio.h> int main() { int integer = -1231232342; int negative = integer < 0 ? -1 : 1; integer = integer * negative; char c[11]; int index = 0; while(integer != 0) { int position = integer % 10; c[index++] = 48 + position; integer = integer / 10; } if(negative == -1) c[index++] = '-'; int swap = 0; while(swap < index / 2) { char t = c[swap]; c[swap] = c[index - swap - 1]; c[index - swap++ - 1] = t; } printf("%s\n", c); return 10; }