I wonder why everyone's asking this for the last few days?? It ahs been answered in most of the other C/C++ forums. The easiest way is to use sprintf and atoi...
#include<stdio.h>
#include<stdlib.h>
int main()
{
char array[] = "1234";
int num = 4321;
sprintf(array, "%d", num); /* int to char array */
num = 0;
num = atoi(array); /* char to int */
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.