Lessons and Tutorials in the Programming Language C.
Data Type:
- Data can be letters, numbers, or words
- Numbers can be integer or real

The variable:
You must first declare the variable specifying which data type you want it to be.
For example if you had a real variable called “test”, write: float test.
Functions:
The prentf function allows you to send output to standard out (for us, the screen).
The scanf function allows you to accept input from standard in (for us is generally the keyboard).
The simplest application of scanf looks like this: scanf(”%f”, &test);
Example :

Escape codes:
All the escape codes are preceded by a backslash (). Here you have a list of some of such escape codes:

Operators:
Assignment:
The assignment operator assigns a value to a variable.
Example: a = b;
Arithmetic operators:
The arithmetical operations supported by the C++ language are:

Compound assignment:

Relational and equality operators:
For example we may want to compare two expressions, for example, to know if they are equal or if one is greater than the other is.

Logical operators:
- The Operator ! is the C++ operator to perform the Boolean operation NOT.
- The logical operators && and || are used when evaluating two expressions to obtain a single relational result.
- The operator && corresponds with Boolean logical operation AND.
- The operator || corresponds with Boolean logical operation OR.
&& operator:

|| operator:





















One Response
Interesting. Thanks.