anshul +1 yes we have to assign some memory to the pointers
On Mon, Sep 12, 2011 at 1:19 PM, rahul vatsa <vatsa.ra...@gmail.com> wrote: > @Anshul +1 > s,t r just pointers variables, and until u don't assign it addr of some > object, where will it keep the values for str elements which r being > assigned in the code. > > > > On Mon, Sep 12, 2011 at 3:38 AM, Sanjay Rajpal <srn...@gmail.com> wrote: > >> Run-Time error for Segmentation Fault. >> >> Sanju >> :) >> >> >> >> On Mon, Sep 12, 2011 at 12:29 AM, Anshul Khandelwal < >> anshul.dans1...@gmail.com> wrote: >> >>> @ teja bala - segmentation fault >>> U hav to allocate memory for c and t pointers of node type. >>> >>> >>> On Mon, Sep 12, 2011 at 12:29 PM, surender sanke <surend...@gmail.com>wrote: >>> >>>> 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. >>>> >>> >>> >>> >>> -- >>> ANSHUL KHANDELWAL >>> B.TECH. Final year >>> Computer Engineering >>> Malaviya National Institute Of Technology, Jaipur >>> >>> >>> -- >>> 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. > -- Piyush Agarwal Final Year Undergraduate Department of Computer Engineering Malaviya National Institute of Technology Jaipur -- 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.