Programming languages have a set of operators that perform arithmetical operations, and others such as Boolean operations on truth values, and string operators manipulating strings of text. Computers are mathematical devices, but compilers and interpreters require a full syntactic theory of all operations in order to parse formulae involving any combinations correctly. In particular they depend on operator precedence rules, on order of operations, that are tacitly assumed in mathematical writing.
Conventionally, the computing usage of "operator" also goes beyond the mathematical usage (for functions). The C programming language, for example also supports operators like &, ++ and sizeof. Operators like sizeof, which are alphanumeric rather than a mathematical symbol or a punctuation character, it is sometimes called a named operator.
In certain programming languages, such as PostScript, the use of the word "operator" has more specific meaning, in that an operator is an executable element in the stack. Because operators here are always written postfix, the need for parentheses is redundant as the way objects are taken from the stack ensures correct evaluation. This is an example of Reverse Polish notation.
In some programming languages an operator may work with more than one kind of data, (such as in Java where the + operator is used both for the addition of numbers and for the concatenation of strings). Such an operator is said to be overloaded. In languages that support operator overloading by the programmer, such as C++, one can define customized uses for operators; in Prolog, one can also define new operators.
Some languages also allow for the operands of an operator to be of different data types, in which case one of them is coerced to the data type of the other, to permit the operation to occur. For example, in Perl 12 + "3.14", causes the text "3.14" to be coerced to a number and produces the result 15.14. The text "3.14" must be transformed into the value 3.14 befor addition can take place. Also 12 is an integer and 3.14 is either a floating or fixed point number (a number the has a decimal place in it) Therefor the integer must be then converted to a floating point or fixed point number. This is however dangerouse in most languages as changing the typing of you variables during execution can have undesired effects and so it is often important in most high level languages that strict typing rules are kept.
In older languages like C. The union was used
union
{
int a;
float b;
};
to allow lose typing. Defining it like this you are always aware of what the possible date you are dealing with is. It is true to say that lose typing should be used sparing if possible. And you should be aware of the type of date retured from your operator and what the coerced effects are in the language you are using.