In c++, its assigning one object to other, its calling operator= default function, if u overload operator= it will call urs. it just assigns ur object contents coming from operator=()
surender On Mon, Sep 12, 2011 at 12:07 PM, teja bala <pawanjalsa.t...@gmail.com>wrote: > s typedef is der... > > > On Mon, Sep 12, 2011 at 12:06 PM, sukran dhawan <sukrandha...@gmail.com>wrote: > >> i think u missed a typedef b4... correct me if im wrong >> >> On Mon, Sep 12, 2011 at 11:10 AM, teja bala <pawanjalsa.t...@gmail.com>wrote: >> >>> @sukran >>> >>> dis was asked in microsoft written ? >>> >>> take node *c 'll create a new node like that >>> >>> On Mon, Sep 12, 2011 at 11:00 AM, sukran dhawan >>> <sukrandha...@gmail.com>wrote: >>> >>>> pl tell me wat ur doin here... here u ve defined a variable node of type >>>> struct n. >>>> >>>> wat does the statement node *c ??? how can u create an instance of an >>>> instance ? >>>> >>>> On Mon, Sep 12, 2011 at 10:52 AM, teja bala >>>> <pawanjalsa.t...@gmail.com>wrote: >>>> >>>>> struct n { int data; struct n* next}node; >>>>> node *c,*t; >>>>> c->data = 10; >>>>> t->next = null; >>>>> *c = *t; >>>>> what is the effect of the last statement? >>>>> >>>>> Is dis correct? >>>>> My Ans:- c 'll point to node t which contains garbage value in data >>>>> fieldc and link field a null >>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Algorithm Geeks" group. >>>>> To post to this group, send email to algogeeks@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. >>>>> >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group. >>>> To post to this group, send email to algogeeks@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. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algogeeks@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. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@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. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@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. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@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.