C is a programming language developed at AT & T's Bell Laboratories of USA in 1972. It was designed and written by a man named Dennis Ritchie. In the late seventies C began to replace the more familiar languages of that time like PL/I, ALGOL, etc. No one pushed C. It wasn't made the 'official' Bell Labs language. Thus, without any advertisement C's reputation spread and its pool of users grew. Ritchie seems to have been rather surprised that so many programmers preferred C to older languages like FORTRAN or PL/I, or the newer ones like Pascal and APL. But, that's what happened.
Possibly why C seems so popular is because it is reliable, simple and easy to use. Moreover, in an industry where newer languages, tools and technologies emerge and vanish day in and day out, a language that has survived for more than 3 decades has to be really good.
A C program is composed of one or more functions that programmers write or use from existing libraries. Every C program begins by executing the function called "main()" which have to write and which is automatically called by the operating system when the program execute.
Use any one of the following syntax to compile the program called hello-world.c
On GNU systems, this results in the creation of an executable program with the default name a.out. To tell the compiler what the executable program to be called, use the -o option for setting the name of the object code.
For default executable file
For the specified executable file
Programming examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content.