hello, BRAND new to C coding... have some experience in HTML but thats it. actually very excited!
i've been reading the tutorial on the main website for C, and im on the second section, but I'm stuck on boolean operators. i read the section a few times and it gives you three examples at the bottom. they are these:
heres the page: If Statements in C - Cprogramming.com TutorialCode:A. !( 1 || 0 ) ANSWER: 0 B. !( 1 || 1 && 0 ) ANSWER: 0 (AND is evaluated before OR) C. !( ( 1 || 0 ) && 0 ) ANSWER: 1 (Parenthesis are useful)
now i think i get how they work: you'd put them after an if statement, like
if im right so far, then that particular statement (the first one) would read if the variable is not 1 or 0, then... am i right? or am i completely off? hahaCode:if !( 1 || 0 )
basically i'm asking if im on the right track, or if i'm not how in the hell do these things work... thanks so much