How do i save the ASCII value? I'm trying to add the ASCII value for each character in a string.
How do i save the ASCII value? I'm trying to add the ASCII value for each character in a string.
Conversions from a char to an int type are already built into C. For example:
Ascii values of a string would probably require a loop to find the sum of the ascii values of each character within the character array.Code:int number; char letter = 'm'; number = 'm'; /* number now holds the ascii value for m */