A Simple Program in C Language
#include<stdio.h>
main()
{
printf("Hello ,you are @www.seekhle.blogspot.com");
}
So this is how you create your programs in C Programming language, this is the way of writing some instructions .Explanation :
#include<stdio.h> is a Preprocessor Directive, It tells the compiler to include this inbuilt system files /libraries (Input Output) into our little program, we are actually telling are compiler what we are doing in our program ,is also known as Header Files .
main() is a default function, Function/ Member Functions used to transfer data or passes messages in our program. This is a default function because main is a Keyword(Inbuilt). The compiler automatically executes the main() first of all, then move to next statement in the program.
{...} is known as local block, contains everything and is responsible only for the specific block, for example here main() .
printf("...") is also an inbuilt keyword used for output, or to display the content contain under " " .
for example here, if executes this program ,this will generate an output:
Hello, you are @www.seekhle.blogspot.com
-remember one thing after any statement you have to write a ; .It tells the compiler to terminate the statement and move further.
No comments:
Post a Comment