Introduction of C Language – Writing “Hello World!” in C Language

2K views 2 minutes read
A+A-
Reset

C Language is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system.

This is one of the most popular programming languages of all time and there are very few computer architectures for which a C compiler does not exist.

C programming language has greatly influenced many other popular programming languages, most notably C++, which began as an extension to C.

Structure of C Program

This is simple example program written in C language and details are described with Line as comments. Hello World! in C Language.

#include<stdio.h>           //Header Files
#include<conio.h>
void main()                 //Main Function
{                           // Opening Parenthesis
  printf("Hello World.");   //Statement
}                           // Closing Parenthesis

Here in above program // are used to write comments.

Hello World in C Language

Above program will display Hello World.

First, # sign is called Pre-processor and used to process files included at first. stdio.h & conio.h  are two basic header files which contain Standard Input Output operations and Console Input Output.

Therefore, we included two header files above. Since we have put these files against # (Pre-processor) C Compiler first process Header files and then rest of Program.

Then, void main() is then required name of main function. Every C Program must have a function named main() and this is executed first. Other functions can be called from inside main() function.

void is return type. We are returning no data type so, our main function returns of void data type. This can be int and other data types as per C Language standard. Read data types in C Language here.

Remember, Each function inside a C Program begins and ends with opening and closing of Curly Brackets { } (middle brackets or braces).

There are many builtin functions which are defined in header files. We used printf(""); method here to write back to console.

Note:

Code in C Language is called Syntax and C Language syntaxes are case sensitive.

So, this is our fist article on C Programming language and we hope you enjoyed.

Related Posts

Leave a Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.