Home >Backend Development >C#.Net Tutorial >What does the division sign mean in C language?

What does the division sign mean in C language?

王林
王林Original
2020-05-12 11:06:5821822browse

What does the division sign mean in C language?

Division operator "/". Binary operator, left associative. When the quantities involved in the operation are all of integer type, the result will be of integer type and decimals will be rounded off. If one of the operands is a real type, the result is a double-precision real type.

Code example:

5/2=2,1/2=0
5/2.0=2.5

Recommended tutorial: c language tutorial

The above is the detailed content of What does the division sign mean in C language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn