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

TypeSet
Lowercasea-z
UppercaseA-Z
Digits0-9
special characters!,@,#,$,%
White spacespace, tab, and new lines

Keywords:
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

Autodogotosignedunsignedbreak
voidelseintcasestaticdouble
sizeofenumlongstructcharif
whileconstexternregistercontinuevolatile
defualtfortypeodeffloatshortreturn
unionconst

Data types: In every language we have to perform some operations means some task on some values of variables.
Example:
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: data-type

Every data type in C language has Storage Size and Value Ranges.

Data typesStorage sizeValue range
char1 bytea-z, A-z, special characters (-128 to 127)
Unsigned char1 byte a-z, A-z, special character(0 to 255)
int2-4 bytes-32768 to 32767 or -214748348 to 2147483647
unsigned int2-4 bytes0 to 65535 or 0 to 4294967295
short 2 bytes -32768 to 32767
unsigned short2 bytes0 to 65535
long4 bytes-2147483648 to 2147483647
unsigned long4 bytes0 to 4294967295
float 4 bytes1.2E-38 to 3.4E+38 6 decimal place
double 8 bytes2.3E-308 to 1.7E+308 15 decimal place
long double 10 bytes 3.4E-4932 to 1.1E+4932 19 decimal place



06-Elements Of C Language Part-1- C Programming Language






    CLICK HERE TO Download This PDF NOTES




Facebook Likes

Youtube