answersLogoWhite

0

1 is an integral integer type with the numeric value 1. '1' is an integral character type with the numeric value 49. That is, ASCII character 49 returns the symbol '1'.

To convert an ASCII character in the range '0' to '9' to its integral numeric value, subtract character '0' from the character. ASCII character '0' has the numeric value 48, thus '1' - '0' = 49 - 48 = 1. To convert a numeric value in the range 0 to 9 to its ASCII character equivalent, add character '0' to the value. Thus 1 + '0' = 1 + 48 = 49 = '1'.

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

What is the difference between pointers in c and c plus plus?

Nothing.


Difference between void and devoid in c plus plus?

There is no such thing as devoid in C++.


What is the difference between be plus ing and get plus ing?

There are no such terms in C++.


What is the Difference between arrays in c and c plus plus?

Nothing whatsoever. They are exactly the same.


Is there any difference between turbo c and c plus plus?

turbo c is a compiler and c++ is a programming language.


What is the difference between cc plus plus and c sharp?

C# is inherited from c++ with some additional features


What is the difference between c plus plus and java programming?

Java doesn't have pointers. C++ has pointers.


What are the main differences between Java and C plus plus?

the difference is that c plus is better because you get big grades


What is the difference between statements in c plus plus charconstp and char constp?

There is no difference. Both statements are invalid.


What is difference between '1' and 1 as for us a computer is concerned with respect to c plus plus?

When you type '1' in a C++ program, it is considered to be of character data type(char). When you type 1, it is considered to be of integer data type.


Difference between java and C plus plus?

java is an advanced object oriented programming language than c++


Defference between c plus plus and c?

these are difference in between c and c++: a) C is a SPL and C++ is a OOP. b) C has not concept of object but C++ has this feature. c) C has not 'class' name data type but C++ has.