Simple int to char[] conversion

The Solution to Simple int to char[] conversion is


main()
{
  int i = 247593;
  char str[10];

  sprintf(str, "%d", i);
// Now str contains the integer as characters
}

Hope it will be helpful to you.

~ Answered on 2011-02-19 09:55:04


Most Viewed Questions: