Thursday, 28 December 2017

Compilation Stages in GCC

The Four Stages of Compiling a C Program

  1. Pre-Processor
  2. Translator
  3. Assembler
  4. Linker 

1) Pre-Processor:-

i) Include header file
ii)Replace macro
iii)Remove the comments
iv)Convert .c file to .i file
v) .i file is also called pure c file 

To convert .c to .i file use below command:-(suppose we have p1.c)
cc -E p1.c -o p1.i 

2) Translator:-

i)It convert the program into Assembly language
ii)It also check syntactical error

To convert .i file to .s file use below command :- 
cc -S p1.i -o p1.s 

3) Assembler:-

i)Convert the program in machine understandable language.
ii)Convert .s file to .o file (Op-Code)


To convert .s file to .o file use below command :- 
cc -c p1.s -o p1.o 

4) Linker:-

i) Links with in built library & adds some OS related information.
ii)Creates an executable file (a.out)


To convert .o file to binary file use below command :- 
cc p1.o -o p1



































Friday, 15 December 2017

Upcoming Topics In C-Programming - 2

Function


Storage Classes

1)Auto
2)Static
3)Extern
4)Register

Recursion

2D Array
Array Of Pointer
Pointer to an Array


String 2D Array

Command Line Argument

Function Pointer


Array Of Function Pointer

Static Memory Allocation

User Defined Datatype
Structure Pointer
3D Array

File Handling
File Pointer

Pre-Processor

Monday, 11 December 2017

Upcoming Topics In C-Programming -1

Basics

1)Compiler Stage
2)Type Of Error
3)Data Type

Operators
1)Unary Operator
2)Secondary Operator
3)Ternary Operator


Type Casting

Type Qualifier

Memory Organization

Control Statement

1)Iterative
2)Non-Iterative


Secondary Data Type:

1)Array
2)Pointer
3)Structure
4)Union
5)Enum
6)Typedef

Sorting Techniques:

1)Bubble
2)Selection