Get ASCII character from number in C/C++
my requirement is, when I input a number (say 01 - 100), I should be able to get the ASCII code value for that number.

Ex: 01 = A, 02 = B, 03 = C, so on...., 90 = Z, and if number is 91 = AA, 92 = AB, 93 = AC, etc...

All I could get from googling, etc...was to convert int to a char, get ASCII value, but that happens only while printing using "%c" but not able to save into a CHAR or STRING.

Ex: 

    int inputNumber=5;  
    char getASCIICharValue = (char)inputNumber;  
    printf("\n getASCIICharValue: %c  \n", getASCIINumberValue);  
    // Above would print 'E' which is correct  
    printf("\n getASCIICharValue as char: %s  \n", getASCIINumberValue);  
    // Above results in a RUN-TIME error.  


While printing it is printing the values properly but while saving it to String or Char it not able to.  

Thanks in Advance !!!




--
Sudheer
Get ASCII character from number in C/C++
===

my requirement is, when I input a number (say 01 - 100), I should be able to get the ASCII code value for that number.

Ex: 01 = A, 02 = B, 03 = C, so on...., 90 = Z, and if number is 91 = AA, 92 = AB, 93 = AC, etc...

All I could get from googling, etc...was to convert int to a char, get ASCII value, but that happens only while printing using "%c" but not able to save into a CHAR or STRING.

Ex: 

    int inputNumber=5;  
    char getASCIICharValue = (char)inputNumber;  
    printf("\n getASCIICharValue: %c  \n", getASCIINumberValue);  
    // Above would print 'E' which is correct  
    printf("\n getASCIICharValue as char: %s  \n", getASCIINumberValue);  
    // Above results in a RUN-TIME error.  


While printing it is printing the values properly but while saving it to String or Char it not able to.  

Thanks in Advance !!!




--
Sudheer