APSC 160 Chapter Notes - Chapter 4.2: Increment And Decrement Operators

46 views2 pages
31 Aug 2016
School
Department
Course

Document Summary

There can be multi statement comment out : /* */ is used for it: There are numerous types of operators in c that can perform various operations on data: +" for example: int a = 6 + 1, result would be a = 7. There are three more arithmetic operators which are modulus denoted as % which gives the remainder. For example: int b = 10 % 2 would give result int b = 0 or int c = 10 % 3 would give result int c = 1 so when 10 is divided by, the remainder is 1. Since it is integer datatype so when we divide it, i. e. int c = 10 / 3, it would be int c = 3 so the quotient will also be an integer and its remainder will be 1. There are two more operators that are ++ which is called increment operator and -- which is decrement operator.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions