Sunday, March 31, 2013

Basics of C programming language

What is C language basic syntax?

This is basic hello world program in c language. You can use turbo c++ or dev c++ to compile and run the c language program.
 #include <stdlib.h>
 #include <stdio.h>
 int main()
 {
 printf ("Hello World \n");
 getch();
 }

C Language is Compiled Language and not Interpreted Language.

There are two types of programming languages: compiled language and interpreted language. A compiler is needed to translate a program written in a compiled language into machine understandable code (that is, binary code) before you can run the program on your machine. When the translation is done, the binary code can be saved into an application file. You can keep running the application file without the compiler unless the program (source code) is updated and you have to recompile it. The binary code or application file is also called executable code (or an executable file).
On the other hand, a program written in an interpreted language can be run immediately after you finish writing it. But such a program always needs an interpreter to translate the high-level instructions into machine-understandable instructions (binary code) at runtime. You cannot run the program on a machine unless the right interpreter is available. You can think of the C language as a compiled language because most C language vendors make only C compilers to support programs written in C.

No comments:

Post a Comment