Keywords and Tags:
C language is a procedural programming language developed by Danish Ritchie. C language is a mid-level programming language. It is a standard language for program development.
Header files contain the definitions of functions and variables which can be incorporated into any c program using the pre-processor #include statement. Standard header files are provided with each compiler.
To use any standard function the appropriate header file should be included. This is done at beginning of the C source file. For using the function printf () in a program the header file should be included at the beginning of program.
In C identifiers must begin with a character or underscore and may be followed by any combination of characters, underscore or the digits 0-9. For example: Ankit Abhishek Number_of_digits. It should be ensured that one must use meaningful names for the identifiers. Meaningful names make the program easier tom read and self documenting. For example: Momentum= mass* velocity. In C language keywords are reserved identifiers that have strict meaning to the C compiler. C has 29 keywords. Some C keywords are if, else, int, char, float, while etc.
Comments are used for explaining difficult sections of codes. Comments are used for documentation of variables and functions and their usage. Comments describe the program, date, author, modification, changes and revisions etc.
A variable is a named memory location in which data of a certain type can be stored. The contents of a variable can change the name. User defined variable must be declared before they can be used in a program. All variables in C must be declared before use. The basic format of declaring variable is Data-type var, var, var.......; Int i, j, k; Char Abhishek; Float length, breadth; Data types in C: Integer type: Integer type data type is a data type which is a whole number may be positive or negative. Character type: These are single characters. The keywords used to define character variable is char For example Char Abhishek; Float: These are numbers containing fractional parts may be positive or negative. Keyword for defining float is Float Floating point values may be like 2.57 and 1.759e5 (1.759 x 105 ). A floating variable X can be declared as Float x; Double data type: Doubles are floating point numbers can be positive or negative. Keyword for defining double variable is Double For example Double height Double 173.2 cm; C language Expressions: In C language expression is combination of constants, variables, operators and function calls. Some examples of expression are a + b a – b a * b Most expressions have value based on their contents.
In C statement is an expression terminated with semicolon. For example Sum= x + y –z; Printf (“well come to India”);
It is the mechanism of translating the statements into machine language. It does not execute but creates executable. It does not execute but creates executable programs. It performs optimization over multiple statements. Its main purpose is to optimize. The entire mechanism of translating C language is called compilation.
It does macro substitution and conditional compilation. It creates source level transformations. Output is still C.
It generates object file machine instructions.
Combine object files into executable image.