Friday, April 28, 2017
C Programming Course - 01
How to print?
Today we will learn how to print a program in C language. At first of the code , we have to write a header file.
#include<stdio.h>
here 'stdio' means 'Standers Input and Output. And ' .h ' says that it is a header file.
After that, we've to write,
int main()
that means , from here the main program is going to be started. Then just write a second bracket and there write your program.
#include<stdio.h>
int main()
{
}
To print, write ' printf ' , use a first bracket,in brackets write inverted comma( between inverted comma you should write what you you want to print ) , before closing inverted comma, write '\n' that means a new line will be printed in your output , and then close bracket and put a semicolon.
#include<stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
At the end of the program, write ' return 0; ' and close second bracket.
Now,your code is ready to give you output. Press f9 to built and run your program.
#Happy_Coding :)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment