Overview Of ‘C’
History Of ‘C’
- C is structured, high level, machine independent language
- Dennis Ritchie at Bell laboratories developed ‘C’ from ALGOL, BCPL & B. ’C’ uses many concepts from these languages and added the concept of data types & other powerful feature
- In 1983, ANSI committee approved ANSI-C. It was then approved by ISO in 1990
Importance Of ‘C’
- Robust Language
- Efficient and fast
- Portable language (machine independent language)
- Program debugging, testing & maintenance easier
- OS like UNIX are written in ‘C’ because of its efficiency
Basic Structure Of ‘C’
- To compile this program press alt+F9 and run this program press ctrl+F9
- \n used to go to next new line
- %d used to print the integer values in output
Character Set Of ‘C’
A character denotes any alphabet, digit or special symbol used to represent information.
C – Tokens Of ‘C’
In a passage of text, individual words and punctuation marks are called Tokens. Similarly in ‘C’ program, the smallest individual units are known as tokens.
- Special symbols
Keywords And Identifiers Of ‘C’
All keywords have fixed meaning. There are 32 (reserved word) keywords available in C.
Identifier refers to the names of variables, functions & arrays. These are user-defined names.
Rules for identifiers
- First character must be an alphabet (or underscore)
- Must consist of only letters, digits or underscore
- Only first 31 characters are significant
- Cannot use a keyword
- Must not contain white space
Constants Of ‘C’
Constants refer to fixed values that do not change during the execution of a program.
‘C’ also supports some special backslash character constants that are used in output functions.
Eg: \b (back space), \n (new line).