---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here
is our first C program
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
welcome.c
#include
<stdio.h>
main()
{
printf("\nWelcome to the world of C");
}
Before
getting into minute details of the syntax, there are few points which you have
to know about C programming.
* C is a
compiler based language which means the whole program is translated into
machine code before execution
* C
language is case sensitive. This means main() and Main() are not the same
* Every C
program must have a function called main()
* main()
is a reserved word and cannot be MAIN() or Main()
* main()
is a function and it is the first function to be executed in a C program
More
about this program
# include
...as of now just note the point that it include the contents of another file
at the beginning of the program
main() is
a function
{} is a
code block which has C syntax
printf()
is a library function which displays the output.
There are
lot more points to explain, but let me take you through step by step.
No comments:
Post a Comment