Elements of C Programming Language
As every language has some basic geometrical rules and elements, similarly C language has some elements and rules for building a program which has some meaning.
Character Set: In Real world to communicate with people we use language like Hindi English Urdu extra which is constructed and Defined by some characters, words extra. Similarly in C programming language we have various characters to communicate with the computer in order to produce a meaningful program and can produce an output.
Character Set In C Language
|White space||space, tab, and new lines|
1) they are those elements of C language whose meaning has already being defined or explained and has seeds task.
2) keyword cannot be used to assign new meaning to the keywords.
32 keywords in C language
Data types: In every language we have to perform some operations means some task on some values of variables.
Like 'Ramesh' Here Ramesh is a set of alphabets all characters.
like '290' here 290 is a Numerical value.
So here Ramesh and 290 are different types and they are allotted to some variables. So in order to recognise each variables and its type we have to specify their types and their types are called 'data types' of that variable.
So the real Example is:
Every data type in C language has Storage Size and Value Ranges.
|Data types||Storage size||Value range|
|char||1 byte||a-z, A-z, special characters (-128 to 127)|
|Unsigned char||1 byte||a-z, A-z, special character(0 to 255)|
|int||2-4 bytes||-32768 to 32767 or -214748348 to 2147483647|
|unsigned int||2-4 bytes||0 to 65535 or 0 to 4294967295|
|short||2 bytes||-32768 to 32767|
|unsigned short||2 bytes||0 to 65535|
|long||4 bytes||-2147483648 to 2147483647|
|unsigned long||4 bytes||0 to 4294967295|
|float||4 bytes||1.2E-38 to 3.4E+38 6 decimal place|
|double||8 bytes||2.3E-308 to 1.7E+308 15 decimal place|
|long double||10 bytes||3.4E-4932 to 1.1E+4932 19 decimal place|