Compilation of C Source Code
In order to write and compile the C program you need the following software ...
1. Text Editor
This will be used to type your program. Examples of few editors like ...
Notepad, Notepad++, Gedit etc.
The files you create with your editor are called source files, and for 'C' they are named with the extension .c.
2. C Compiler
C compiler will use to compile your source code into executable program.
You can use any standard C compiler like GNU C, Turbo C, Dev C etc.
Note : In this tutorial we have used GNU C/C++ compiler in order to make the examples.
You can also use popular IDE, in order to write and execute your C programs.
Like :- TurboC, Dev C, Code Block etc...
Compiler is a translator.
Convert High-Level source code to object code.
Object produced by compiler gets saved in a file. So file do not need to compile again and again.
Interpreter is a translator.
Used to translate source code to object code.
Interpreter scans one line at a time of source program if there is any syntax error ,the execution of program terminates immediately.
Assembly and machine language are low level language.
The assembly codes are easier to write but system can executes the machine code only.
So we need a translator (Assembler) to translate assembly code to machine code.
A linker is a program that combines object codes to form an executable program.
It links the object modules with library functions and make executable program.
Loader is an operating system utility that copies program from a storage device to main memory, where they can be executed.
It is a part of Operating System(OS) and used to load the program.
Compilation on Windows
Using Turbo C IDE F2 : SAVE SOURCE CODE F2 Again : SOURCE CODE BACKUP Alt + F9 : COMPILE F9 : MAKE EXE Ctrl + F9 : COMPILE + RUN Alt + F5 : LAST OUTPUT
Compilation on Linux
Using GCC on Terminal Compile Command: gcc source_code.c Run Command: ./a.out or Compile Command: gcc -o abc.out source_code.c Run Command: ./abc.out
Training For College Campus
We offers college campus training for all streams like CS, IT, ECE, Mechanical, Civil etc. on different technologies
C, C++, Data Structure, Core Java, Advance Java, Struts Framework, Hibernate, Python, Android, Big-Data, Ebedded & Robotics etc.
Please mail your requirement at email@example.com
Projects For Students
Students can contact us for their projects on different technologies Core Java, Advance Java, Android etc.
Students can mail requirement at firstname.lastname@example.org