Discussion :: OOPS Concepts - General Questions (Q.No.49)
|Nazmul said: (May 3, 2013)|
|Because when you create an object of a class you indirectly call the constructor function of that class. So, in OOPS, all functions are not resolved at compile time only.|
|Ghost In C++ said: (Oct 22, 2013)|
|While creating objects we are indirectly calling constructors. So all functions cannot be be resolved by compiler alone.|
|John said: (Oct 29, 2014)|
|What about calling a function in C by pointer to function? Isn't that kind of dynamic?|
|Abhijeet said: (Jan 19, 2016)|
|Going through above discussion I feel that the answer is wrong.
struct Emp e;
int *ptr = malloc(sizeof(e));
Malloc get resolved at run time and not compile time. Similarly calloc, realloc.
|Mani said: (Aug 12, 2017)|
|Can you clear me why All function calls are resolved at compile-time in Procedure Oriented Programming?|
|Rohit Ghadge said: (Jun 1, 2019)|
|Answer is right.
C supports only "Early Binding" in which all the functions related to their function calls are resolved at compile time.
C++ Supports both "Early Binding" and "Late Binding". Late Binding is the process of resolving functions related to function calls during Run time.
In C++ virtual calling mechanisms are resolved at run-time.
Hence, Option (c) only 1 correct.
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.