C Tutorials

101. Arithmetic Operators in C

By: Tamil Selvan : 2007-09-20

Description: The binary arithmetic operators are +, -, *, /, and the modulus operator %. Integer division truncates any fractional part. The expression


102. Relational and Logical Operators in C

By: Tamil Selvan : 2007-09-20

Description: The relational operators are > >= < <=. They all have the same precedence. Just below them in precedence are the equality operators. Relational operators have lower precedence than arithmetic operators


103. Type Conversions in C (String to Integer, isdigit() etc)

By: Abinaya : 2007-09-20

Description: When 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 that convert a ``narrower'' operand into a ``wider'' one without losing information, such as converting an integer into floating point in an expression like f + i. Expressions that don't make sense, like using a float as a subscript, are disallowed. Expressions that might lose information, like assigning a longer integer type to a shorter, or a floating-point type to an integer, may draw a warning, but they are not illegal.


104. Increment and Decrement Operators in C

By: Baski : 2007-09-20

Description: C 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 frequently used ++ to increment variables, as in


105. Bitwise Operators in C

By: Charles : 2007-09-20

Description: C 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.


106. Assignment Operators and Expressions in C

By: Daniel Malcolm : 2007-09-20

Description: The 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 they're not. And an assignment operator may even help a compiler to produce efficient code.


107. Conditional Expressions in C

By: Emiley J : 2007-09-20

Description: The conditional expression, written with the ternary operator ``?:'', provides an alternate way to write this and similar constructions. In the expression


108. Precedence and Order of Evaluation in C

By: Fazal : 2007-09-20

Description: Table 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 precedence; rows are in order of decreasing precedence, so, for example, *, /, and % all have the same precedence, which is higher than that of binary + and -. The ``operator'' () refers to function call. The operators -> and . are used to access members of structures;


109. The if else statement in C

By: Grenfel : 2007-09-20

Description: The if-else statement is used to express decisions. Formally the syntax is


110. The Birth and history of C Programming Language

By: Emiley J : 2007-09-07

Description: The C language shook the computer world. Its impact should not be underestimated, because it fundamentally changed the way programming was approached and thought about. The creation of C was a direct result of the need for a structured, efficient, highlevel language that could replace assembly code when creating systems programs. As you probably know, when a computer language is designed, trade-offs are often made, such as the following: