P
prashna
Hi all,
Is'nt a function invocation through a function pointer is dynamic
binding?
For example consider the following program
1 int main()
2 {
3 int (*fun_ptr)();
4 int fun(){printf("HIIIIII\n");}
5
6 fun_ptr = fun;
7
8 fun_ptr();
9 return 0;
10 }
Consider the statement at line 8..I guess, which function to be
invoked,at line 8, will be decided at runtime..Is this what is called
as dynamic binding or polymorphism or is it different from
this?..Totally confused with this concept..anybody please help me..
Is'nt a function invocation through a function pointer is dynamic
binding?
For example consider the following program
1 int main()
2 {
3 int (*fun_ptr)();
4 int fun(){printf("HIIIIII\n");}
5
6 fun_ptr = fun;
7
8 fun_ptr();
9 return 0;
10 }
Consider the statement at line 8..I guess, which function to be
invoked,at line 8, will be decided at runtime..Is this what is called
as dynamic binding or polymorphism or is it different from
this?..Totally confused with this concept..anybody please help me..