ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
#include<iostream>
Lines beginning with a pound sign (#) are used by the compilers pre-processor. In this case the
directive #include tells the pre-processor to include the iostream standard file. This file iostream
includes the declarations of the basic standard input/output library in C++. (See it as including
extra lines of code that add functionality to your program)
include <stdio.h> //This is needed to run printf() function.
int main()
{
printf("C Programming"); //displays the content inside quotation
return 0;
}
Output
C Programming
Explanation of How this program work s
1. Every program starts from main() function.
2. printf() is a library function to display output which only works if #include<stdio.h>is
included at the beginning.
3. Here, stdio.h is a header file (standard input output header file) and #include is command to
paste the code from the header file when necessary. When compiler encounters printf()function
and doesn't find stdio.h header file, compiler shows error.
4. Code return 0; indicates the end of program. You can ignore this statement but, it is good
programming practice to use return 0;.

More Related Content

#Include

  • 1. #include<iostream> Lines beginning with a pound sign (#) are used by the compilers pre-processor. In this case the directive #include tells the pre-processor to include the iostream standard file. This file iostream includes the declarations of the basic standard input/output library in C++. (See it as including extra lines of code that add functionality to your program) include <stdio.h> //This is needed to run printf() function. int main() { printf("C Programming"); //displays the content inside quotation return 0; } Output C Programming Explanation of How this program work s 1. Every program starts from main() function. 2. printf() is a library function to display output which only works if #include<stdio.h>is included at the beginning. 3. Here, stdio.h is a header file (standard input output header file) and #include is command to paste the code from the header file when necessary. When compiler encounters printf()function and doesn't find stdio.h header file, compiler shows error. 4. Code return 0; indicates the end of program. You can ignore this statement but, it is good programming practice to use return 0;.