Home >Backend Development >C#.Net Tutorial >What types of operations are there in C language?

What types of operations are there in C language?

下次还敢
下次还敢Original
2024-05-08 12:09:18840browse

The types of operations in C language include: Arithmetic operations: addition, subtraction, multiplication, division, remainder, auto-increment, auto-decrement Comparison operations: equal to, not equal to, greater than, less than, greater than or equal to, less than or equal to Logical operations: AND, OR, non-bitwise operations: bitwise AND, bitwise OR, bitwise XOR, left shift, right shift Assignment operations: assignment, compound assignment Special operations: comma operator, conditional operator, address fetch operator, dereference operator, sizeof operator

What types of operations are there in C language?

#Types of operations in C language

In C language A series of operations are provided to perform various operations on data. Mainly include the following categories:

1. Arithmetic operations

  • Addition ( )
  • Subtraction ( -)
  • Multiplication (*)
  • Division (/)
  • Find remainder (% )
  • increment( )
  • decrease(--)

2. Comparison operation

  • is equal to (==)
  • is not equal to (!=)
  • Greater than (>)
  • ##Less than (<)
  • ##Greater than or equal to (>=)
  • Less than or equal to (<=)
3. Logical operations

    and ( &&)
  • ## or (||)
  • not (!)
  • ## 4. Bitwise operations

Bitwise AND (&)

  • Bitwise OR (|)
  • Bitwise XOR (^)
  • Shift left (<<)
  • Shift right (> >)
  • 5. Assignment operation

Assignment (=)

  • Compound assignment (=, -=, *=, /=, %=)
  • 6. Special operations

Comma operator (,)

  • Conditional operator (?:)
  • Address operator (&)
  • Dereference operator (*)
  • sizeof operator

The above is the detailed content of What types of operations are there 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