APSC 160 Chapter Notes - Chapter 4.4: Negation, Logical Connective, Logical Conjunction

28 views2 pages
31 Aug 2016
School
Department
Course

Document Summary

The last logical operator is not operator which negates everything. That is if it"s true it returns false and vice versa. So if it is !true, it returns false. If it is !false, it returns true . basically, it just reverses it. If we use example a = 4, b = 6 , and we write it in a way , ! (a == 6 && b == 8) , the result logical not operator returns in true. And is false and not operator negates it or reverses it. There are some more operators which are of different use. C programming language helps us to make decision by using if- else statement. If explained in laymen terms, conditions are evaluated and based on condition whether true or false, that condition is executed. For example, if it"s raining then we will stay at home else we will go outside. In programming language this is written in the following way:

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