answersLogoWhite

0

How do you convert integers in character using c?

Updated: 8/17/2019
User Avatar

Wiki User

14y ago

Best Answer

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

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you convert integers in character using c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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


How do you convert cyclohexanol to nylon-6?

using cu and NH2OH at 250 C


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


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.


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

With libbmp and libjpeg. STFW for details.


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


Associative property of addition using integers?

The associative property states, no matter how you order three or more integers being added, they will always equal the same solution. For example, A + (B + C) = (A +B) + C * * * * * The equation is correct but the description is not. When you say "no matter how you order three or more integers" you are implying that A + B + C = A + C + B and that need not be true. Associativity refers to the order in which the summation is carried out. That does not matter.