Home
|
NovaMind Home
|
Friends
|
0 New Messages
|
Profile
|
? Help
Login
|
Sign Up
Search:
Mind Maps
People
Subscribe
anything with value is an expression
C Programming Language
>
C Expressions
>
Definition
>
Map Branches
Definition
anything with value is an expression
Exception
(void)0 has no value so anything (void)0 is not an expression
Compound Expressions
a combination of expressions
myInt = 7; if ( (myInt >= 1) && (myInt <= 10) )
Safe Expressions
Use: 0 == myInt Don't Use: myInt == 0
ensures a missing "=" in == is picked up by compiler
Examples
variables including uninitialized variables
Assignment Statements
Statements evaluating operators
Comparative Operators
Compare left and right side of expressions
Produce a value of 1 or 0
myExample = 9; if ( myExample == 10 )
Logical Operators
constants true and false
also equate to 1 and 0
myExample = false; if ( myExample )
myExample = false; if ( ! myExample )
myExample1 = false; myExample2 = false; if ( myExample1 && myExample2 )
myExample1 = false; myExample2 = true; if ( myExample1 || myExample2 )
Comments
►
0 branch comments of 0 total for this map and 0 for the whole document
You must be logged in to post comments