It is time to make our first program. we will learn to write the first program in C Language and then try to understand its structure. Let's write a simple and most basic program Hello World in C language.
#include //Pre-processor directive
int main() //main function declaration
{
printf("Hello World"); //to output the string on a display
return 0; //terminating function
}
Hello World
When we want to process some information, we will save the values in variables. The following program we will define some variables and initialize with values
Algorithm#include //Pre-processor directive
int main() //main function declaration
{
char a='S'; //Defining variables
int b=10; //initialize with values
float c=25.80;
printf("%c %d %f",a,b,c); // Printing results
return 0; //terminating function
}
S 10 25.800000