else if statement in C
This sequence of if statements is the most general way of writing a multi-way decision. The expressions are evaluated in order; if an expression is true, the statement associated w
Read tutorialTHE TUTORIAL LIBRARY
This sequence of if statements is the most general way of writing a multi-way decision. The expressions are evaluated in order; if an expression is true, the statement associated w
Read tutorialThe if-else statement is used to express decisions. Formally the syntax is
Read tutorialTable below summarizes the rules for precedence and associativity of all operators, including those that we have not yet discussed. Operators on the same line have the same precede
Read tutorialThe conditional expression, written with the ternary operator ``?:'', provides an alternate way to write this and similar constructions. In the expression
Read tutorialThe assignment operator makes the code easier to understand, since the reader doesn't have to check painstakingly that two long expressions are indeed the same, or to wonder why th
Read tutorialC provides six operators for bit manipulation; these may only be applied to integral operands, that is, char, short, int, and long, whether signed or unsigned.
Read tutorialC provides two unusual operators for incrementing and decrementing variables. The increment operator ++ adds 1 to its operand, while the decrement operator -- subtracts 1. We have
Read tutorialWhen an operator has operands of different types, they are converted to a common type according to a small number of rules. In general, the only automatic conversions are those tha
Read tutorialThe relational operators are > >= <
Read tutorialThe binary arithmetic operators are +, -, *, /, and the modulus operator %. Integer division truncates any fractional part. The expression
Read tutorialAll variables must be declared before use, although certain declarations can be made implicitly by content. A declaration specifies a type, and contains a list of one or more varia
Read tutorialAn integer constant like 1234 is an int. A long constant is written with a terminal l (ell) or L, as in 123456789L; an integer constant too big to fit into an int will also be take
Read tutorialOne example today. A better developer tomorrow.