Lecture2 Variables Operators
Lecture2 Variables Operators
Lecture2 Variables Operators
IIT Bombay
Reference: “C How to Program”, Deitel and Deitel, 8th Edition, Chapter 2 (and Appendix C)
Declare variables to store user data
Variable declaration: data type and name
Logical NOT (!) negates the original condition (achievable using other ways)
C evaluates all equality, relational, logical expressions to 0 or 1
0 indicates false, 1 or any non zero value indicates true
C also has bool data type, takes true or false values (more on this later)