Dennis Ritchie developed "C" language in 1970 at AT&T Bell laboratories. initially it was designed for programming in the operating system called UNIX.After advent of "C" whole UNIX operating system and C compiler also rewritten in c language. if you open source code of Linux then you also get more than 80% code written in C language.
Why C:-
we know that when we write a code for any program. when we executing data is store in register . for all microcontrolers and microprocessors they have different sets of registers for storing data. so assembly or other language has change their instruction that is very difficult to remember for us. i.e we use c language for programming purpose and it also user friendly programming because for other platform we have to less change in programming. in c language only 32 keywords.
Structure of c programs:-
//comments
preprocessor directives
global variable
int main(void)
{
local variables
statements
.......................
...................
return 0;
func(0
.................
......................
}
Compilation and execution of c programs:-
Preprocessor
compiler (translater)
Assmbler
linker
These are the four step of compilation and execaution of our c program.....
In first stage our source code goes to preprocessor here we get expended code extension of (.i)
in 2nd stage our expended code convert in assembly code extension of(.s)
in 3rd stage our assembly code convert in object code extension of (.o)
in final stage linker convert it into executable code extension of (.exe)or (.out) depend on platform.
No comments:
Post a Comment