This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Int to ASCII

I have a uint32_t variable. I want to print its ASCII equivalent value.
can anyone help me here.

Parents
  • I used the following code in my dissertation last year and I was told it was an unusual solution. I let you must adapt and extend the following

    char *ConvertIntToString ( int Value )
    {
      switch ( Value )
      {
        case 0: return "0";
        case 1: return "1";
        case 2: return "2";
        case 3: return "3";
        case 4: return "4";
        case 5: return "5";
        case 6: return "6";
        case 7: return "7";
        case 8: return "8";
        case 9: return "9";
        default: return "ERROR: TOO LARGE";
      }
    }
    

Reply
  • I used the following code in my dissertation last year and I was told it was an unusual solution. I let you must adapt and extend the following

    char *ConvertIntToString ( int Value )
    {
      switch ( Value )
      {
        case 0: return "0";
        case 1: return "1";
        case 2: return "2";
        case 3: return "3";
        case 4: return "4";
        case 5: return "5";
        case 6: return "6";
        case 7: return "7";
        case 8: return "8";
        case 9: return "9";
        default: return "ERROR: TOO LARGE";
      }
    }
    

Children