Variables are identifiers that can store a changeable value. These can be different data types.
It must consist only of letters, digits, and underscore and must not begin with a digit.
An identifier defined in the C standard library should not be redefined.
It is case sensitive; meaning uppercase is not equal to the lowercase.
You must not also include embedded blanks.
You must not also use any of the C language keywords as your variable/ identifier and do not call your variable / identifier by the same name as other functions.
All variables must be declared before they may be used.
Before declaring variables, specify first the data type of the variable/s. Variables must be separated by comma. All declarations must be terminated by a semicolon (;).
There are two kinds of variables. The LOCAL VARIABLE,
variables that are declared inside a function. It can only be referenced by statements that are inside the block in which the variables are declared and GLOBAL VARIABLES.
variables that are declared inside a function. It can only be referenced by statements that are inside the block in which the variables are declared and GLOBAL VARIABLES.
Constants are identifier / variables that can store a value that cannot be changed during program execution. Example is the const int count = 100;
where integer count has a fixed value of 100.
Operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. There are three classes of operators in C: arithmetic, logical and relational, and bitwise.
where integer count has a fixed value of 100.
Operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. There are three classes of operators in C: arithmetic, logical and relational, and bitwise.
The arithmetic operators are + for addition, - for subtraction, * for multiplicsation, / for divsion, % for modulus divisor, -- to decrement a value, and ++ to increment a value.
In the term relational operator, the word relational refers to the relationship values can have with one another. In the term logical operator, the word logical refers to the ways these relationships can be connected together using the rules of formal logic.
hehe.
The relational operators are > for greater than, >= for greater than or equal to, <>
The logical operators are && (action is 'and'), (action is 'or') and ! (action is 'not').
Bitwise operators are the testing, setting or shifting of the actual bits in a byte or a word, which corresponds to C’s standard char and int data types and variants. They cannot by used on type float, double, long double, void or other more complex types.
? Operator is a very powerful and convenient operator that can be used to replace certain statements of the if-then-else form.
Expression refers to anything that evaluates to a numeric value.
The Order of Precedence is:
()
!, unary +, -
*. /. %
binary + , -
<, <=, >, >=
==, !=
&&
No comments:
Post a Comment