User Tools

Site Tools


c:arithmetic_operators

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

c:arithmetic_operators [2024/02/16 00:48] (current)
Line 1: Line 1:
 +====== arithmetic operators ======
 +
 +* (multiplicator) \\
 +/ (dividing) \\
 +% (modulo) ... e.g. rest of a number\\
 ++ -\\
 +++ --\\
 +
 +==== example ====
 +<code c>
 +#include <stdio.h>
 +
 +int main (void) {
 +int x,y;
 +x=2;
 +
 +x = x+1; // = 3
 +x = x++; // = 3
 +x = ++x; // = 3
 +x = +=x; // = 4
 +// and so on
 +
 +/*
 +for the wired case of 
 +x = x+++x;
 +or 
 +x=x---x; 
 +
 +that means 
 +x = x++ +x; 
 +and 
 +x = x-- -x;
 +
 +
 +also possible is
 +
 +x = x- --x;
 +*/
 +}
 +
 +</code>
 +
  

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/arithmetic_operators.txt · Last modified: 2024/02/16 00:48 (external edit)

Impressum Datenschutz