LED PANEL

Google It, You'll Get It.

Monday, January 31, 2011

Fundamental - "Welcome to C"

#include"< stdio.h >"

main()
{
printf("Welcome to C Programming \n"); // displays output
printf("Bye Bye\n");
}



========================================
When You Consider about the above coding, it is the simplest coding you can write using C.

#include"< stdio.h >" :
the header file which have used to complete this coding. basically it is a very common header file which we have to use.

"stdio" : stands for STandarD Input Output
".h" : indicates that it is a header file in the library

so the stdio.h means standard input output header file.

it uses to read a input from a user and to display or print anything for the user.

main():
display or commands the compiler saying that it is the main programme of the coding.
since its a small coding you wont feel the advantage and purpose of writing it. but when u learn the 'functions', im sure u'll undrstand it very well.

{}:
curly braces are neccesary or in other words its a must in a coding to seperate each parts, and also to seperate functions(or for now just think it like processes).

printf:
it have used to display a the message which is in between the Parentheses
[ Ex: (xxx_message_xxx) ].
It is a pre defined functioned which is actuly defined in the header file called stdio.h. to use that function only we need to use this header file. So since the display or the output is necessary in a programe we use this header file most of the time.

"\n" :
command to use the next line.

//comment(or a message about the code) :
that how u make a comment, and i'm gonna use it in further codings also.... all the things which you are typing after two forward slashes wont get compile from the compiler. it consider all those after // as comments.

No comments:

Post a Comment