CSC 111 Chapter Notes - Chapter 2: Boolean Expression, Operand, Bitwise Operation

82 views8 pages

Document Summary

If you need a placeholder to store number 1000000, you need an int. Thus, to save space, you want to use a primitive with the smallest possible data size. The primitives byte, short, int, and long can only hold integers or whole numbers, for numbers with decimal points you need either a float or a double: float = 32-bit, double = 64-bit. An operator performs an operation on one, two or three operands. Ex: x + 4 operands: x,4 operator: + Any legal combination of operators and operands are called an expression. expression. A boolean expression results in either true or false. And, the result of a floating-point expression is a floating point number. There are 6 categories of operators: unary operators, arithmetic operators, relational and conditional operators, shift and logical operators, assignment operators, other operators. Unary operators: unary operators operate on one operand.

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