Otherwise, first, to convert the int to a string:
#include <stdio.h>
int n = 12345678;
int len = snprintf(NULL, NULL, "%d", n);
char *digits = malloc(len);
sprintf(digits, "%d", n);
Then you could split the string up various ways, such as:
int a, b, c;
sscanf(digits, "%2d%2d%4d", &a, &b, &c);
Or:
char sa[2], sb[2], sc[4];
char *cp = digits;
sa[0] = *cp++;
sa[1] = *cp++;
sb[0] = *cp++;
sb[1] = *cp++;
sc[0] = *cp++;
sc[1] = *cp++;
sc[2] = *cp++;
sc[3] = *cp++;
printf("%2c %2c %4c\n", sa, sb, sc);
Or:
// Create 3 buffers to hold null-terminated ('\0' terminated) strings
char sa[3] = { 0 } , sb[3] = { 0 }, sc[4] = { 0 };
char *cp = digits;
sa[0] = *cp++;
sa[1] = *cp++;
sb[0] = *cp++;
sb[1] = *cp++;
sc[0] = *cp++;
sc[1] = *cp++;
sc[2] = *cp++;
sc[3] = *cp++;
printf("%s %s %s\n", sa, sb, sc);
Then free your memory:
free(digits);
Etc...
Etc...
Etc...