Type conversion in C
In the C language there are different basic data types, such as int, char, float, double; there are also some user defined data types such as structures, arrays, etc. If the operator is taking operands of different data types, then they are converted to a common data types by certain rules. Generally, automatic conversions are those which can convert a narrower operand into a wider one without loss of information. For example, converting an integer to floating point in examples like float + integer (on 64-bit machine). A char is simply a small integer, so chars may be freely used in arithmetic expressions.
|This programming language–related article is a stub. You can help Wikipedia by expanding it.|