banner image

Introduction of C Programming with Syntax

c programming introduction
C programming is forefather of all other programming languages such as c++, java, php etc.  So first, you have to have some knowledge about c programming that definitely helps you to make up your programming mind. You may already know Denis Richie who is the propounder of C programming language.

In fact, C is the first high level language that revolutionize the whole programming world ie technology world. Indeed, it is a kind of language which was built for software programming, so it is called programming language.

The most useful achievements of C language are unix operating system, mysql language, linux OS etc which are totally based on c programming because these are built only using c programming language.

C programming is written under the extension ".c". Any code or application when you write in c programming, you must save them in ".c" extension.

If you have some knowledge about c programming, you may know that c programming code needs a compiler to run it because "C" is high level language. Therefore it needs compiler so as to convert high level language into binary code ie into the form of 0 and 1. C code is called high level language because it is written in human understandable code which must be compiled in the form of 0 and 1 that is called machine understandable code.

How to set up environment of c programming?

Of course, in order to write and run your c code, you must set up its environment. First of all, you need a compiler, as we have already told you. Second is that you must have a text editor like notepad or notepad++ or you can directly write code from compiler. The most popular compiler for C coding are turbo c, turbo c++ or borland turbo C etc that you have to install into your laptop/computer. 

When you write and save c code using turbo c, your saved file is stored in bin folder in default. 

Basic syntax of C code starts from "#include < stdio.h >" header file. This file is called header file because it includes various inbuilt functions, keywords etc. If any file included writing #include in C, that is called header file which stores many functions and keywords. Except stdio.h, another most important part of c programming is main function. Indeed, main() function's jobs are written/stored into the header file stdio.h. And main function is the body part of c programming language. Therefore, stdio.h header file must have been included into any c code.
# include < stdio.h >
#include < conio.h>
void main ( )
{
    printf("Hello Demo");
    getch();
}  
c demo syntax output
C Demo Code

C Demo Output
The above 3 lines' coding is a demo syntax of c programming where you can see that we have used two header files that stdio.h and conio.h and main () with return type void having no arguments. At last we have written a printf function which prints "Hello Demo", then there you can see getch() function which only plays role of holding screen in this code. 
Introduction of C Programming with Syntax Introduction of C Programming with Syntax Reviewed by Ariyal on September 04, 2015 Rating: 5

No comments:

Post AD

Powered by Blogger.