I think u r right lucky On Sat, Aug 21, 2010 at 11:45 AM, luckyzoner <luckyzo...@gmail.com> wrote:
> With reference to the first question...I would say that both the > statements were given seperately. > The answer to the question is : Hello Hello...as i have tried it out. > The reason for the output as i think is that the class functions are > allocated the memory even if no object of the class has been created > and the functions are passed the address of the object when an object > tries to call the member functions. > > In this case when calling A->print().....although the A has a garbage > value....it is still a address which is being used to call the > function. > > And also in case of B->print().....u are passing 0 as an address to > the member function. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Rahul singhal RnD Engineer Tejas Networks Mobile- 09916969422 -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.