C programming is an imperative procedural language. It was designed to compiled using a relatively straightforward compiler and it also provides the access to memory to provide language constructs to follow the machine instructions.
In this section, you will learn how to start with c programming and also I will explain this by using a simple and easy example program which prints the “Hello World”. Apart from this, you will also learn the below things:
Below are the basic commands of C programming language:
int main(): Main function, from where execution of C program begins.
Follow the below steps to compile and execute the C programs.
Step 1) Go to the path where you have saved your C programs.
Step 2) Assume you have saved your C programs in D drive, then run this command to compile your program D:\C Programs>tcc hello.c
Step 3) After execution of “tcc command”, just type the program name and hit the enter button.
/* Our first simple C basic program */
printf("Hello World! ");
Below program will take input from the user using scanf and print while program execute.
printf("Please enter an integer\n");
printf("You have entered number is: %d\n", number);
Enter an integer
Integer entered by you is 50
Below is the list of recommended c programming books for the beginners.
Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies. View all posts by Prem Tiwari