Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Operator (computer programming)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Examples == {{category see also|Operators (programming)}} ;Mathematical operators * [[Arithmetic]]: such as addition, <code>a {{red|+}} b</code> * [[Relational operator|Relational]]: such as [[Greater-than sign|greater than]], <code>a {{red|>}} b</code> * [[Mathematical logic|Logic]]: such as <code>a {{red|AND}} b</code> or <code>a {{red|&&}} b</code> * [[Assignment (computer science)|Assignment]]: such as <code>a {{red|=}} b</code> or <code>a {{red|:=}} b</code> * [[Three-way comparison]] (aka spaceship): <code>x {{red|<=>}} y</code> ;Program structure operators * [[Record (computer science)|Record]] or [[Object (computer science)|object]] [[Field (computer science)|field]] access: such as <code>a{{red|.}}b</code> * [[scope resolution operator|Scope resolution]]: such as <code>a{{red|::}}b</code> or <code>a{{red|.}}b</code> ;Conditional operators * [[Ternary conditional operator|Ternary conditional]]: <code>condition {{red|?}} a {{red|:}} b</code> * [[Elvis operator|Elvis]]: <code>x {{red|?:}} y</code> * [[Null coalescing operator|Null coalesing]]: <code>x {{red|??}} y</code> ;Notable C and C++ operators * Address-of operator: <code>{{red|&}}x</code> * [[Dereference operator|Dereference]]: <code>{{red|*}}p</code> * [[Comma operator|Comma]]: <code>e{{red|,}} f</code> {{anchor|Compound operator|Fused operation}} ;Compound operators * [[compound assignment operator|Compound assignment]] (aka augmented assignment) in C/C++: <code>+=</code>, <code>-=</code>, <code>*=</code>, <code>/=</code>, <code>%=</code>, <code><<=</code>, <code>>>=</code>, <code>&=</code>, <code>^=</code>, <code>|=</code> * [[fused operation|Fused]]: such as [[cis (mathematics)|{{math|1=cis ''x'' = cos ''x'' + ''i'' sin ''x''}}]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)