BINDING TIMES TRB CSI › Programming with C++ › binding times

BINDING TIMES

Binding என்பது ஒரு programming entity-க்கு ஒரு property / attribute-ஐ associate செய்வது. Simple Tamil: ஒரு name, variable, operator, function போன்றவற்றுக்கு அதற்கான meaning/type/memory/address போன்ற ஒன்றை connect செய்வதே Binding.

Premium — locked Advanced 34 min 272 cards 34 programs 10 MCQs v2
This is a premium lesson. You can see the shape of every card — unlock to read them. Unlock

BINDING TIMES…

Premium This card is part of the premium lesson. Unlock
Definition

Binding என்பது ஒரு programming entity-க்கு ஒரு property / attribute-ஐ associate செய்வது. S……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

int x = 10; இங்கு: x → int என்ற association உருவாகிறது. ……

Premium This card is part of the premium lesson. Unlock
List

1. BINDING என்றால் என்ன?…

Premium This card is part of the premium lesson. Unlock
Explanation

Programming language-ல் பல associations இருக்கும். Examples: Variable name ↔ Data type Variable ↔ ……

Premium This card is part of the premium lesson. Unlock

SIMPLE EXAMPLE

Explanation

int age = 25; இங்கு பல bindings இருக்கின்றன. age ↓ Identifier name age → int Type binding.……

Premium This card is part of the premium lesson. Unlock

BINDING TIME

Definition

ஒரு binding எப்போது establish செய்யப்படுகிறது என்பதே Bi……

Premium This card is part of the premium lesson. Unlock

BASIC FORMULA

Definition

Binding = Entity + Attribute associ……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

int x; x-ன் type int என்று compiler தெரி……

Premium This card is part of the premium lesson. Unlock
List

1. WHY BINDING TIME IS IMPORT……

Premium This card is part of the premium lesson. Unlock
Explanation

Binding early-ஆ அல்லது late-ஆ நடப்பது programming language-ன்: Flexibility Efficiency Safety Portability……

Premium This card is part of the premium lesson. Unlock

MAJOR BINDING TIMES

Explanation

Programming language concepts……

Premium This card is part of the premium lesson. Unlock

Language Design Time

Language Implementation Time

Compile Time

Link Time

Load Time

Runtime

Explanation

சில textbooks: Program Writing Time……

Premium This card is part of the premium lesson. Unlock

COMPLETE FLOW

Explanation

Language Design ↓ Language Implementation ↓ Program Writing ↓……

Premium This card is part of the premium lesson. Unlock

LANGUAGE DESIGN TIME

Definition

Programming language create/design செய்யப்படும் நேரத்தில் சில lan……

Premium This card is part of the premium lesson. Unlock

LANGUAGE DESIGN TIME EXAMPLE

Definition

C++ language designers decide……

Premium This card is part of the premium lesson. Unlock
Definition

- means addition in suitable ……

Premium This card is part of the premium lesson. Unlock
Definition

if is a keyword while is a keyword int repres……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

a + b…

Premium This card is part of the premium lesson. Unlock
List

- operator-ன் basic meaning l……

Premium This card is part of the premium lesson. Unlock
List
Programmer தனியாக

- means addition…

Premium This card is part of the premium lesson. Unlock
Explanation

என்று ஒவ்வொரு program-லும் de……

Premium This card is part of the premium lesson. Unlock

KEYWORD BINDING

Explanation

C++: while இந்த word ஒரு loop keyword என்று decide செய்யப்பட்டிருப்பது……

Premium This card is part of the premium lesson. Unlock

OPERATOR BINDING AT LANGUAGE DESIGN

Explanation
Example

a + b Basic + syntax and meaning……

Premium This card is part of the premium lesson. Unlock
List

- → multiplication…

Premium This card is part of the premium lesson. Unlock
Explanation

/ → division % → remainder for integral operands இவை language design-level decisions……

Premium This card is part of the premium lesson. Unlock

LANGUAGE IMPLEMENTATION TIME

Definition

ஒரு programming language-க்கு compiler/interpreter/runtime implement செய்யும் போது……

Premium This card is part of the premium lesson. Unlock

IMPLEMENTATION TIME EXAMPLE

Definition

Data type size ஒரு classic example. C++ language standard சில ranges/……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

sizeof(int) ஒரு implementation-ல் commonly: 4 bytes ஆக இருக்கலா……

Premium This card is part of the premium lesson. Unlock

IMPLEMENTATION TIME PROPERTIES

Explanation

Examples: Representation of integer Floating-point implementation details Size/alignment choices w……

Premium This card is part of the premium lesson. Unlock

PROGRAM WRITING TIME

Explanation

Programmer source code எழுதும் போது சில bindings explicitly select செய்கிறார். int mark; Programmer: mark → i……

Premium This card is part of the premium lesson. Unlock

ANOTHER PROGRAM WRITING EXAMPLE

Explanation

double salary; Programmer decides: salary ……

Premium This card is part of the premium lesson. Unlock

COMPILE TIME BINDING

Explanation

மிகவும் important.…

Premium This card is part of the premium lesson. Unlock
Definition

Compiler source program translate செய்யும……

Premium This card is part of the premium lesson. Unlock

COMPILE-TIME TYPE BINDING

Explanation
Example

int x = 10; Compiler knows: x → int Compile time-ல்……

Premium This card is part of the premium lesson. Unlock

STATIC BINDING

Explanation

Compile time அல்லது execution-க்கு முன் fix ஆகும……

Premium This card is part of the premium lesson. Unlock
Program
Example
Explanation

show() call எந்த non-virtual function-ஐ refer செய்கிறது ……

Premium This card is part of the premium lesson. Unlock

EARLY BINDING

Definition

Program execution ஆரம்பிக்கும் முன்பே association resolve செய்யப்பட்டால்: Early Binding……

Premium This card is part of the premium lesson. Unlock

COMPILE-TIME EXAMPLE - OVERLOADING

Definition

void print(int x) { cout…

Premium This card is part of the premium lesson. Unlock

OPERATOR OVERLOADING BINDING

Definition

a + b If a and b are integers:…

Premium This card is part of the premium lesson. Unlock
Definition

- → integer addition…

Premium This card is part of the premium lesson. Unlock
Definition

If user-defined class overloads +: obj1 + obj2 compiler s……

Premium This card is part of the premium lesson. Unlock

LINK TIME

Definition

Object modules மற்றும் libraries ஒன்றாக conn……

Premium This card is part of the premium lesson. Unlock

SIMPLE LINK TIME EXAMPLE

Definition

File 1: int add(int, int); int main() { return add(10,20); } File 2: int add(int a, int b) { return a + b; ……

Premium This card is part of the premium lesson. Unlock

EXTERNAL FUNCTION BINDING

Explanation

sqrt() implementation math library-ல் இருக்கலாம். Linking……

Premium This card is part of the premium lesson. Unlock

LINKER ROLE

Explanation

Object File + Library ↓ Linker ↓ Resolve externa……

Premium This card is part of the premium lesson. Unlock

LOAD TIME

Definition

Executable memory-க்கு load செய்யப்பட……

Premium This card is part of the premium lesson. Unlock

LOAD TIME ADDRESS BINDING

Definition

Executable disk-ல் இருக்கும்போது final physical memory position known இல்லாமல் இருக்கலாம். Loader:……

Premium This card is part of the premium lesson. Unlock

RELOCATION

Definition

Program memory-ல் load செய்யும்……

Premium This card is part of the premium lesson. Unlock
Concept

Program compiled address ↓ Loader ↓ Actual loaded address Address adjustment load time-ல் h……

Premium This card is part of the premium lesson. Unlock

DYNAMIC LIBRARY BINDING

Concept

Shared libraries: .dll .so பயன்படுத்தும் sys……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

Executable ↓ Dynamic Loader ↓……

Premium This card is part of the premium lesson. Unlock

RUNTIME BINDING

Explanation

இது மிகவும் முக்கியமான topic.…

Premium This card is part of the premium lesson. Unlock
Definition

Program execute ஆகிக் கொண்டிருக்கும் நேரத்தில் es……

Premium This card is part of the premium lesson. Unlock

LATE BINDING

Definition

Actual association program execut……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

C++ virtual functions.…

Premium This card is part of the premium lesson. Unlock

VIRTUAL FUNCTION EXAMPLE

Why? p type: Base* ஆனால் அது poin……

Premium This card is part of the premium lesson. Unlock

இதுவே: Dynamic Binding…

Premium This card is part of the premium lesson. Unlock

STATIC VS DYNAMIC BINDING - SAME EXAMPLE

Program
Without virtual
Program
Call

Function selection static type அடிப……

Premium This card is part of the premium lesson. Unlock

runtime-ல்.…

Premium This card is part of the premium lesson. Unlock

STATIC BINDING

Definition

Binding compile time / before execution fixed ஆகும். Also called: Early Binding C……

Premium This card is part of the premium lesson. Unlock

DYNAMIC BINDING

Definition

Binding runtime-ல் resolve ஆகிறது. Also call……

Premium This card is part of the premium lesson. Unlock

STATIC VS DYNAMIC BINDING

COMPILE-TIME POLYMORPHISM

Definition

Examples: Function Overloading Oper……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

void fun(int); void fun(double); Call: f……

Premium This card is part of the premium lesson. Unlock

RUNTIME POLYMORPHISM

Explanation

Achieved mainly using: Inheritance + Virtual Functions + Base pointer/refer……

Premium This card is part of the premium lesson. Unlock

MEMORY BINDING

Explanation

Variable-க்கு memory allocate செய்யப்படும் time variable வகையைப் பொறுத்து மாறும். S……

Premium This card is part of the premium lesson. Unlock

LOCAL VARIABLE BINDING

Explanation

Function call செய்யும்போது x-க்கு storage created ஆகும். Functi……

Premium This card is part of the premium lesson. Unlock

DYNAMIC MEMORY BINDING

Explanation

int* p = new int; new execute செய்யும் போது: Heap me……

Premium This card is part of the premium lesson. Unlock
Concept

p ↓ Heap memory location ↓ 10……

Premium This card is part of the premium lesson. Unlock

VALUE BINDING

Concept

int x; cin >> x; x value user input அடிப்படையில் run……

Premium This card is part of the premium lesson. Unlock

TYPE BINDING

Concept

C++: int x; x type: int compile time-ல் fixed. Python: x = 10 Then: x = "Hello" Names and object ty……

Premium This card is part of the premium lesson. Unlock

STATIC TYPE BINDING

Concept

Type before runtime decided.…

Premium This card is part of the premium lesson. Unlock
Explanation
Example

double amount; amount → doubl……

Premium This card is part of the premium lesson. Unlock

DYNAMIC TYPE BINDING

Explanation

Language variable/name type associati……

Premium This card is part of the premium lesson. Unlock
Explanation

Now: x refers to integer object Later: x = "Hello" Now: x r……

Premium This card is part of the premium lesson. Unlock

NAME BINDING

Explanation

Identifier எந்த declaration/entity-ஐ refer செய்……

Premium This card is part of the premium lesson. Unlock
Explanation

Inside fun(): x → local x not global x. இந்த resol……

Premium This card is part of the premium lesson. Unlock

SCOPE AND BINDING

Explanation

Binding மற்றும் scope closely related. Binding: Na……

Premium This card is part of the premium lesson. Unlock
Program
Example
Explanation

Binding: x → local integer va……

Premium This card is part of the premium lesson. Unlock

LIFETIME AND BINDING

Explanation

Scope மற்றும் lifetime same அல்ல. Sc……

Premium This card is part of the premium lesson. Unlock
Program
Example
Explanation

count scope: fun() only But lifetime: Entire……

Premium This card is part of the premium lesson. Unlock

BINDING AND STORAGE ALLOCATION

Explanation

Different storage categories: Static allocation Stack allocation Heap allocation Static P……

Premium This card is part of the premium lesson. Unlock

STATIC STORAGE ALLOCATION

Explanation
Example

static int count; Storage program execution duration வரை இர……

Premium This card is part of the premium lesson. Unlock

STACK DYNAMIC ALLOCATION

Program
Example
Explanation

Function invocation: fun() ↓ Activation recor……

Premium This card is part of the premium lesson. Unlock

HEAP DYNAMIC ALLOCATION

Explanation

int* p = new int; Runtime: ne……

Premium This card is part of the premium lesson. Unlock

OPERATOR BINDING

Explanation
Example

10 + 20 +: integer addition C……

Premium This card is part of the premium lesson. Unlock
List
Here

- → string concatenation oper……

Premium This card is part of the premium lesson. Unlock
Explanation

Appropriate overloaded operat……

Premium This card is part of the premium lesson. Unlock

METHOD BINDING

Explanation

Object-oriented programming-ல் method call: obj.show(); Which show() gets execu……

Premium This card is part of the premium lesson. Unlock

VTABLE - CONCEPTUAL IDEA

Explanation

C++ compilers commonly implement virtual dispatch using structures o……

Premium This card is part of the premium lesson. Unlock
Important

The C++ language standard specifies behavior, not that every c……

Premium This card is part of the premium lesson. Unlock

DYNAMIC DISPATCH

Important

Virtual method runtime select……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

Base reference ↓ Derived object ↓ Virtual call ↓ Runtime dispatc……

Premium This card is part of the premium lesson. Unlock

EARLY BINDING ADVANTAGES

Explanation

Faster execution Compiler optimization eas……

Premium This card is part of the premium lesson. Unlock

EARLY BINDING DISADVANTAGES

Explanation

Less runtime flexibility More decisi……

Premium This card is part of the premium lesson. Unlock

LATE BINDING ADVANTAGES

Explanation

Flexibility Runtime polymorphism Extensibility Dynamic behavior……

Premium This card is part of the premium lesson. Unlock

LATE BINDING DISADVANTAGES

Explanation

Runtime overhead More complex implementat……

Premium This card is part of the premium lesson. Unlock

BINDING TIMES - COMPLETE TABLE

ONE EXAMPLE THROUGH ALL STAGES

Program
Consider
Explanation

Now inch-by-inch: Language Design Time C++ defines: class virtual new pointer meanings. Implementation Time C……

Premium This card is part of the premium lesson. Unlock
Explanation

actual object: Circle so: Cir……

Premium This card is part of the premium lesson. Unlock

BINDING TIME AND FLEXIBILITY

Explanation

Very important principle: Earlier Binding ↓ Less flexibi……

Premium This card is part of the premium lesson. Unlock

BINDING TIME AND LANGUAGE DESIGN

Explanation

Language designer chooses whether some decision should be: Design Time Compile Ti……

Premium This card is part of the premium lesson. Unlock

BINDING TIME AND ERRORS

Explanation

Early binding: Errors often detected early. int x = "Hello"; Compiler diagnostic. Late binding: Some probl……

Premium This card is part of the premium lesson. Unlock

BINDING TIME AND EFFICIENCY

Explanation

If compiler already knows: Function Type Memory layout Operation it can optimize better. Therefore stat……

Premium This card is part of the premium lesson. Unlock

BINDING TIME AND POLYMORPHISM

Explanation

C++ polymorphism: Compile-Time Polymorphism ↓ Static Binding Examp……

Premium This card is part of the premium lesson. Unlock

OVERLOADING VS OVERRIDING

Explanation

Important connection. Overloading void show(int); void show(double); Which function? Co……

Premium This card is part of the premium lesson. Unlock

STATIC BINDING EXAMPLE

Program
Compiler can determine
Explanation

early.…

Premium This card is part of the premium lesson. Unlock

DYNAMIC BINDING EXAMPLE

Because: Actual object = B Ru……

Premium This card is part of the premium lesson. Unlock

BINDING vs ASSIGNMENT

These are not same. Binding: ……

Premium This card is part of the premium lesson. Unlock
Practice
Assignment

Store/change a value…

Premium This card is part of the premium lesson. Unlock
Explanation
Example

int x; Type binding: x → int ……

Premium This card is part of the premium lesson. Unlock
Practice
Assignment

10 stored in x…

Premium This card is part of the premium lesson. Unlock

BINDING vs DECLARATION

Practice

Declaration introduces entity/type. int x; Binding is broader: x ↔ i……

Premium This card is part of the premium lesson. Unlock

BINDING vs LINKING

Practice

Do not confuse. Binding General association. Linking Object……

Premium This card is part of the premium lesson. Unlock

BINDING vs SCOPE

Practice

Binding = What does the name ……

Premium This card is part of the premium lesson. Unlock
Explanation
Example

int x = 10;…

Premium This card is part of the premium lesson. Unlock
Explanation

Inside fun(): x binds to loca……

Premium This card is part of the premium lesson. Unlock
Flow

Complete binding time flow: Language Designed ↓ Keywords / Syntax fixed ↓ Compiler Implemented ↓ Representati……

Premium This card is part of the premium lesson. Unlock
Important

Most important definitions: Binding = Association between a program entity and an attribute. Binding……

Premium This card is part of the premium lesson. Unlock
Memory Trick

Order நினைவில் வைக்க: D I C L L R D → Design Time I → Implementation Time C →……

Premium This card is part of the premium lesson. Unlock
Comparison
Static Binding vs Dynamic Binding
Common Mistake
Common error

Do not confuse: Binding ≠ Assignment Binding ≠ Linking Static Binding ≠ Static Var……

Premium This card is part of the premium lesson. Unlock
Important

dynamic binding and dynamic memory allocation both runtime-related concepts……

Premium This card is part of the premium lesson. Unlock
TRB Point

1. Association between an ent……

Premium This card is part of the premium lesson. Unlock
TRB Point

Answer: Binding…

Premium This card is part of the premium lesson. Unlock

Time at which an association is established:

TRB Point

Answer: Binding Time…

Premium This card is part of the premium lesson. Unlock

Binding resolved before execution:

TRB Point

Answer: Static / Early Binding…

Premium This card is part of the premium lesson. Unlock

Binding resolved during execution:

TRB Point

Answer: Dynamic / Late Binding…

Premium This card is part of the premium lesson. Unlock

C++ virtual functions use:

TRB Point

Answer: Dynamic Binding…

Premium This card is part of the premium lesson. Unlock

Function overloading normally uses:

TRB Point

Answer: Static Binding…

Premium This card is part of the premium lesson. Unlock

External references are commonly resolved at:

TRB Point

Answer: Link Time…

Premium This card is part of the premium lesson. Unlock

Program mapped to memory at:

TRB Point

Answer: Load Time…

Premium This card is part of the premium lesson. Unlock

Heap memory allocation occurs at:

TRB Point

Answer: Runtime…

Premium This card is part of the premium lesson. Unlock

Runtime polymorphism depends on:

TRB Point

Answer: Dynamic Binding…

Premium This card is part of the premium lesson. Unlock
MCQ

Binding is:…

Premium This card is part of the premium lesson. Unlock
MCQ

Binding time refers to:…

Premium This card is part of the premium lesson. Unlock
MCQ

Which is an example of late b……

Premium This card is part of the premium lesson. Unlock
MCQ

Function overloading is gener……

Premium This card is part of the premium lesson. Unlock
MCQ

External function references ……

Premium This card is part of the premium lesson. Unlock
MCQ

A variable's value obtained t……

Premium This card is part of the premium lesson. Unlock
MCQ

Dynamic binding is also calle……

Premium This card is part of the premium lesson. Unlock
MCQ

Which is most associated with……

Premium This card is part of the premium lesson. Unlock
MCQ

Which occurs before program e……

Premium This card is part of the premium lesson. Unlock
MCQ

Which is the correct order?…

Premium This card is part of the premium lesson. Unlock
TRB Point
Exam point

2 Marks: Define Binding Binding is the association of an attribute with a program entity, such as binding a v……

Premium This card is part of the premium lesson. Unlock
Summary

Binding ↓ Entity + Attribute ↓ When association occurs? ↓ Binding Time Major binding times: Language Design T……

Premium This card is part of the premium lesson. Unlock
Text size
17px
Theme
Contents
Print / PDF
Program