0

Hi again guys. Well i need to convert char to int my problem is how can i get the exact value of int if for ex:

char x=2;

i need to convert that to integer.

4
Contributors
4
Replies
6
Views
7 Years
Discussion Span
Last Post by rax_19
0

Conversion is not necessary. The char data type is a one-byte integer.

char x = 2;
int y = x;

The compiler will promote the char to int during the assignment.

0

also we can use the function of convert char to integer. also we can use Pointer in it.

0

>>also we can use the function of convert char to integer.

Please name that function. There is no standard C function because its not needed.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.