A Simple program to print a line ::
#include<stdio.h> /* #include<stdio.h> is a directive to the C preprocessor.
Lines beginning with # are processed by the preprocessor
before the program is compiled. #include<stdio.h> tells the
preprocessor to include the contents of the standard
input/output header (<stdio.h>) in the program.
This header contains information used by the
compiler when compiling calls to standard input/output
library functions such as printf & scanf. */
#include<conio.h>
void main() /* here "void main()" is used for turbo c++
compiler to write a program in dev c++
compiler we use "int main()" and end with return 0; */
{
printf("welcome to C!\n"); // \n is used to goto next line
getch(); // getch() is used to stay on the program
}
#include<stdio.h> /* #include<stdio.h> is a directive to the C preprocessor.
Lines beginning with # are processed by the preprocessor
before the program is compiled. #include<stdio.h> tells the
preprocessor to include the contents of the standard
input/output header (<stdio.h>) in the program.
This header contains information used by the
compiler when compiling calls to standard input/output
library functions such as printf & scanf. */
#include<conio.h>
void main() /* here "void main()" is used for turbo c++
compiler to write a program in dev c++
compiler we use "int main()" and end with return 0; */
{
printf("welcome to C!\n"); // \n is used to goto next line
getch(); // getch() is used to stay on the program
}