Looping in C Programming Language

 Looping in C Programming Language Use: When we want to perform specific task repeatedly then we can use looping. In C Language there are three type of loop: For Loop While Loop Do while Loop Nested for Loop Each Loop statement requires three things: Initialization  Test Condition Increment/Decrement Operation 1. For Loop: For Loop is a repetition control structure which allow us to write a loop that is executed a specific number of time. Syntax:               for( initialization ; test condition; increment/decrement operation)                 {                    ------                    body of for loop;                    ------               } 2. While Loop: While Loop is use to per to p...

STEP OF EXECUTION OF C PROGRAM

 STEP OF EXECUTION OF C PROGRAM



During the execution of C program following steps are performed by system:

Step 1: Create C Program
  • User creates a program to perform specific task.
  • Program has set of instruction.
  • User writes set of instructions in C Editor.
  • This Program is also known as source program or source code.
  • User store/save a program as file name .C in specific location.

Step 2: Compiling C Program
  • After creation of C Program compiler checks any error is occurred or not.
  • If any error is occurred then it will display all errors in one message box.
  • If any error is not occurred, compiler converts source program into object file which is in 0 or 1 form (Machine Code)
  • After Compilation, linker linked object file with system library and converts object file into executable file.

Step 3: Execution of C Program
  • Loader loads executable file from hard-disk to RAM.
  • Finally Processor execute C Program from RAM.     


DEFINITION OF COMPILER, LINKER, LOADER, ASSEMBLER, TRANSLATOR, INTERPRETER:

  • Compiler: Compiler is a system program to find out errors from the program and converts source code to machine code/object code.    

  • Linker: Linker is a system program to link object file with system library and converts object file into executable file.

  • Loader: Loader is a system program to load executable file from hard-disk to RAM (Primary Memory).

  • Assembler: Assembler is a system program to convert assembly language code to machine code.

  • Translator: Translator is a system program to convert high level language to low level language.
                    There are two translators: 
                            1. Compiler
                            2. Interpreter                        
  • Interpreter: Interpreter is a system program to check/find out error line by line from your program and converts source code to machine code.

Comments

Popular posts from this blog

Data Types in C Program

Different Modules to solve the program/problem

Operators in C Program