Basic of C Programming Language

1
Basic Information about C Programming Language. Basic C Programming in Simple Word using on This Blog. So, Guy, This Blog Provide Basic Information And Simple Trick.

Basic of C Programming Language 

What is a Program? | introduction to c language
So Guy Firstly Explain Program in Simple Word. A Set of Step-by-Step Instructions That Directs The Computer to Perform Tasks and Produce Results.

Various Steps Involved in Program Development are:- | c programming examples with output

  • Defining and Analyzing The Problem.
  • Developing a Solution Technique (Algorithms) and Flowcharts.
  • Coding.
  • Documenting The Problem.
  • Compiling and Running The Program.
  • Testing And Debugging.
  • Maintenance.

Basic of C Programming Language:-
Coding:-
  • Writing The Program is Called Coding.
  • In This Step, The Logic That Has Been Developed in The Algorithm is Used To Actually Write The Program.
  • Using Any Programming Language, The Algorithm Can Be Converted To Coding.
Compilation Of A C Program:-
Compiling a C Program is a Multi-Stage Process. The Process Can Be Split into Four Separate Stages.

  1. Preprocessing.
  2. Compilation.
  3. Assembly.
  4. Linking.

Basic of C Programming Language:-
Preprocessing:-
  • This is The First Phase Through Which Source Code is Passed.
  • A Preprocessor Phase Produces input To Compilation Phase.
  • In This Stage, Lines Starting With a # Characters are interpreted by The Preprocessor as Preprocessor Commands.
  • Overall This Phase/Preprocessor Performs The Following Functions.
  1. Removal Of Comments.
  2. Macro Expansion (Replace Macro name with code).
  3. Expansion of The Included Files. (File Inclusion). { Includes Reader Files in Source Code }.
The Preprocessed Output is Stored in The Filename:-
____________________________________________________________

Example:-

/* This is Demo */
#include<stdio.h>                                             Code of Stdio.h File Void 
void main()                         < Preprocessor >       Main() 
{                                                                          {
printf("Hello Word");                                            printf("Hello Word");
}                                                                           }

___________________________________________________________________________________

Basic of C Programming Language:-

Source Program
                  |                   
Preprocessor
|
Modified/Extended Source Program (Hello. i)
|
Compiler
|
Target Assembly Language Program (Hello.s)
|
Assembler
|
Relocatable Machine Code/Binary Code (Hello. obj)
|
Linker/Link Editor - Libraries
                                                   - Relocatable Object Files
|
Executable Machine Code (Hello.exe)

     Execution of a Program

Basic of C Programming Language:-
Compilation:-
  • Compiling is a Process in Which The Source Program Instructions are Translated Into a Form That is Suitable For Execution By The Computer.
  • In This Stage, The Preprocessed Code is Translated To Assembly Instructions. These Form an Intermediate Human Readable Language. In Assembly Code, All The Instructions are Defined By English.
  • Words Known as Mnemonics.
  • So in Short, Compiler Generates Assembly Code Which is Stored in Filename.s 
Example:-
-----------------------------------------------------------------------------------
Preprocessed Code                     < Compiler >          Assembly Code
-----------------------------------------------------------------------------------

_Assembler:-_ | c language interview questions
  • In This Stage, An Assembler is Used To Translate The Assembly Instructions To Machine Code or Object Code. In OUtput Consists Of Actual Instructions To Be Run By Target Process.
  • An Assembler is a Program That Converts Assembly Language Instructions into Machine Language That Can Be Executed By Computer.
  • So, Assembler Converts Assembly Code Into a Binary Code ( Object Code ) in The Form of O's And I's Stored in Filename. o or Filename. obj.
Example:-

Assembly Language Instructions  ------   Assembler   ------ 00100100
                                                                                         110011010
                                                                                         1010101
                                                                                         0010100                                                                                                   "Object Code"

Basic of C Programming Language | c programming examples with output.

Post a Comment

1Comments

Please Select Embedded Mode To show the Comment System.*