First C Program-Hello Word Print | My CS Tutorial - My CS Tutorial

Breaking

Programming languages full tutorial and programs, exam papers, visual basic( Vb.net ), information of new technologies and more....

Wednesday, June 12, 2019

First C Program-Hello Word Print | My CS Tutorial

First C program


In this tutorial, we will learn how programs are writte in the C language. And how they are compile and run.

You open the software where you write a program as turboC++ and write the code which are as...

We can use other object for this program which are as..


[Write a program that display a message (Hello word) on to the screen.]



#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("\n Hello,welcome to computer zone.");
printf("\n My name is Harsh Chauhan.");
printf("\n this is my first program of C language.");
getch();
}

Output:





Parts of a C program

#include  statement (preprocessor)

Void main() (function)

Variable

Printf (library function)

getch()  or return(0)  (terminates the main() and return the value)

{}  (use on start and end of function)



Description of above parts


#include<stdio.h>

Include is a standard I/O library function.It is a preprocessor.It is tells to compiler add <stdio.h> file before actual compilation.

Void main()

Void main() or int main() is a main part of a program.It is a function. Void main() is the entry part of every C program.

{

This symbol is use after the main() function because the exicuation of every program is started here.It is use on start of function.

Variable

Variable is the name of a memory location where the data are stored.In this place we declare the variables.

Printf

Printf is a library function in C language. It is used for print the data on the screen(console).

Getch() or return(0)

It is use for return the value.

}

This symbol is use after the getch() because the exicuation of every program is end here.It is use on end of function.



_______________________________________


Please share this post and blog link with your friends.For more programs use this blog.

If you have any problem, please comment in comment box, subscribe this blog for notifications of new post on your email and follow this blog.If you have any method of this tutorial or program or want to give any suggestion send email on hc78326@gmail.com

Created by-- HARSH CHAUHAN


No comments:

Post a Comment