Structure of C Program
/* This program prints Hello on Console Screen */
#include<stdio.h>
void main()
{
printf("hello world");
}
Comments:
In computer programming, a comment is a programmer-readable explanation or annotation in the source code of a computer program.Comments are statements that are not executed by the compiler and interpreter. All the comments will be put inside /*...*/ as given in the example above. A comment can span through multiple lines.
#include<stdio.h>
These commands tells the compiler to do preprocessing before doing actual compilation. Like #include <stdio.h> is a preprocessor command which tells a C compiler to include stdio.h file before going to actual compilation.
void main()
This is the main function, which is the default entry point for every C program and the void in front of it indicates that it does not return a value.
{...}
Curly braces which shows how much the main() function has its scope.
printf("hello world");
The C Programming language provides a set of built-in functions. In the above example printf() is a C built-in function which is used to print anything on the screen.
Post a Comment
If you have any doubts, Please let me know
Thanks!