CS 24000 Lecture Notes - Lecture 5: Short Circuit, Bitwise Operation

39 views2 pages

Document Summary

Cs240 lecture 5 notes 01262017 bitwise and && || My string is a string constant of type (char *: there are no operations with string in java like hello + world , however, two consecutive string constants can be put together by the complier, hello. World is equivalent to: hello. world , so you can have multi-line strings like, char * class , cs240 \n , programming in c \n , the compiler will put both constants in a single string. Short-circuit && (and) and || (or) expression: e1 && e2 is the short circuit and expression, if e1 is false, e2 is not evaluated if(x && (i = y)) // then i=y is never evaluated: e1||e2 is the short circuit or expression, if e1 is true, then e2 is never evaluated if (x || (i=y)) Boolean and int: there is no boolean type, a 0 is false and anything different than 0 is true.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents