answersLogoWhite

0

In C, an integer and a character are the same thing, just represented differently.

For example:

int x = 65;

printf("x = (int) %d, (char) %c\n", x, x)

should print "x = (int) 65, (char) A"

You can also use the atoi (ascii to integer) and itoa (integer to ascii) functions.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How do you convert a character into its ascii value?

In C a character already is its ASCII value: char c= 'A'; printf ("%c is %d (0x%x hexa)\n", c, c, c);


How to capitalize the first letter of a string without using built in C functions?

jst subtract 32 from first character of string to convert it into capital


How do you convert number into roman using C?

100 = C as a Roman numeral


How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


Programme for sum of two integers using C?

int a = 1; int b = 2; int c = a + b; // Sum


If the product of 6 integers is negative at most how many of the integers can be negative?

assume that whatever integers you are using are the variables in this. If you haven't been given integers, assume (for the sake of simplicity) that they are one. a * b * c * d * e * f = x -a * b * c * d * e * f = -x -a * -b * c * d * e * f = x -a * -b * -c * d * e * f = -x see a pattern? any ODD number of negative integers will lead to a negative answer, therefore with the limit being 6, the answer will be 5.


Convert .exe file to .sis formate using C language?

love


How do you convert an integer into a text using C?

sprintf is the most common solution


How do you convert cyclohexanol to nylon-6?

using cu and NH2OH at 250 C


How do you convert bmp image to jpg by using C or C Plus Plus?

With libbmp and libjpeg. STFW for details.


Where you are using -127 in character data type in c language?

Anywhere I need to.


What is the conversion for 60 degrees F to celsius?

60 degrees Fahrenheit would convert to 15.5 degrees celsius. You can convert F to C using the formula (5/9) x (F-32) You can also convert Celsius to Fahrenheit by using the formula (1.8 x C) + 32