Formally: "A program is a precise sequence of steps to solve a particular problem." At its most basic level, programming a computer simply means telling it what to do. Without these instructions or programs, computers are merely dumb machines. Computers are incredibly stupid. They do exactly what we tell them to do: no more, no less-- unlike human beings. Computers can't think by themselves. In this sense, they differ from human beings. For example, if someone asks you, “What is the time?”, “Time please?” or just, “Time?” you understand anyway that he is asking about the time but computer is different. Instructions to the computer should be explicitly stated. Computer will tell you the time only if you ask it in the way you have programmed it. When you're programming, it helps to be able to "think'' as stupidly as the computer does, so that you are in the right frame of mind for specifying everything in minute detail, and not assuming that the right thing will happen by itself.
YOUR FIRST PROGRAM
This is how you should write your first codes:
/* This is what we call a header file */
#include
/* All programs should have a main function that will execute all the commands in a program */
main()
/* This is an open curly brace that start enclosed commands of a program*/
{
/* This prints the Hello World message on the screen */
printf("Hello World!");
/*This will ask the user to press any character or key to conclude the program */
getch();
/* This ends the commands of the main function */
}
Here's what you should know first
HEADER FILES Header files contain definitions of functions and variables which can be incorporated into any C program by using the pre-processor #include statement. You can also set a global variable with a definite value by using #define statement.