Wed May 16 2018
Introduction to C Programming: A Beginner's Tutorial
What is C?
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.
How to Compile C program in Linux?
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.
cc hello-world.c -o hello-worldor
gcc hello-world.c -o hello-world
How to run executable file in Linux?
For default executable file
For the specified executable file