Programming with C

⌘K
  1. Home
  2. Docs
  3. Programming with C
  4. Basics of C Programming
  5. Expressions
  6. Assignment operators

Assignment operators

A variable can be assigned a value by using an assignment operator

  • Shorthand is of the form op1 op= op2
  • Where op1 and op2 are operands
  • op= is a shorthand assignment operator

Example

a/=2 is equivalent to a=a/2

The assignment operators in C include,

Views: 1

How can we help?

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments