Assume variable A holds 10 and variable B holds 20, then − Operator The following table lists down a few of the important arithmetic operators available in C programming language. Similarly, a programming language provides various arithmetic operators. In their simplest form, such expressions produce numerical results. These two statements are called arithmetic expressions in a programming language and plus, minus used in these expressions are called arithmetic operators and the values used in these expressions like 2, 3 and x, etc., are called operands. Take a look at the following two examples − Similar concepts exist in Computer Programming. If you have been even a poor student, you must be aware that in first expression 2 and 3 are operands and + is an operator. We can write a computer program which can do simple calculation like adding two numbers (2 + 3) and we can also write a program, which can solve a complex equation like P(x) = x 4 + 7x 3 - 5x + 9. Arithmetic OperatorsĬomputer programs are widely used for mathematical calculations. This chapter will explain the concept of operators and it will take you through the important arithmetic and relational operators available in C, Java, and Python. An operator in a programming language is a symbol that tells the compiler or interpreter to perform specific mathematical, relational or logical operation and produce final result.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |