History of C language.
The C Language was created by Dennis Ritchie at the laboratories in 1972. The UNIX system was developed in C Language between 1977 and 1979. In 1983 the American National Standards Institute (ANSI) to amend and standardized the language. In 1972 and still it is rank 2 on the TIOBE Index and 4 in IEE Spectrum Index. C was firstly developed for the UNIX Operating System. C is also called the mother of modern programing languages.
What are the key features of C programing that makes it unique?
- Pointer mechanism.
- Functions.
- Extensible.
- Library functions.
- Compiled language.
Applications of C Language.
- Operating Systems.
- Language Compilers.
- Assemblers.
- Databases.
- Utilities.
- Text Editors.
Structure of C language.
Example;
C New lines
- New lines are indicated by \ n.
- New line is an escape sequence.
Example;
#include <stdio.h>
int main(){
printf("Hello World!\n");
printf("I love learning C language.");
return 0;
}
C Comments
- C comments prevent execution when testing.
- Single line comments start with (//).
- For short comments we use single line comments.
#include <stdio.h>
int main(){
return 0;
}
#include <stdio.h>
int main(){
return 0;
}
- Multi-line comments start with /* ends with */.
- For long comments we use multi-line comments.
#include <stdio.h>
int main(){
return 0;
}