Features of Programming 'C'


 Features of C

  • “C” is a case sensitive language so all the predefined words(keywords) must be written in lower case only.
  • “C” has own editor to write and execute its program.
  • It is a compiler based language. So its program is translated and executed by the compiler..
  • Every statement in “C” program must be terminated by semicolon(;) so semicolon is called as statement terminator.
  • “C” is a platform independent but architectural dependent programming language.
            Platform independent means if its program has been written on windows XP operating system then it can be executed on any version of windows and vice versa.
            Architectural dependent means if the “C” program has been written on IBM based
computer then it can’t be executed on apple Macintosh and Intel based computer system.

Saving, Compiling and Running 'C' Program

Saving:- 
The “C” program file can be saved by any name with extension “.c”. This file is called as source file. And, the source file has been always saved in (C:\TurboC++\Disk\TurboC3\BIN).

Compiling:-
After writing the “C” program, either by pressing “Alt + F9” button or by selecting “Compile” option from “Compile” menu.
    During compilation phase the compiler checks the all syntactical and linking error within program. If the program has any error then all the error are displayed at a time with their line numbers and messages. We must have to solve all the errors within our program because if the program has been one error then it can’t be executed.
    If the program has no any error that is the compilation is successful then the compiler translate whose source code into object code and two types of files are automatically created by the compiler whose primary name is same as the source file but the extension are as follows:-
(i)  .obj:- It is called as object file and it holds the link up code of our source code and predefined library code. The object file also hold the code in machine language but it is not a complete machine code that’s why it can’t be executed. The size of object file is more than the size of source file.
(ii) .exe:- It is called as an executable file. It is created automatically by the compiler according to the object file. It holds the complete machine code of the object code, which represent to the compiler that now our program is ready fro execution.

Running:- 
After creating and executable file(.exe file), we can execute our program either by pressing Ctrl + F9 or by selecting “Run” option from “Run” menu.

NOTE:- The program may have warning also. The warning can be ignored. It means the program can be executed if it has warning. The warning can effect on output at run time. But for a good program the program should not have warning.

Prev                                                    Next

Post a Comment

0 Comments