Run-Time error for Segmentation Fault.

Sanju
:)



On Mon, Sep 12, 2011 at 12:29 AM, Anshul Khandelwal <
[email protected]> 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 <[email protected]>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 
>> <[email protected]>wrote:
>>
>>> s typedef is der...
>>>
>>>
>>> On Mon, Sep 12, 2011 at 12:06 PM, sukran dhawan 
>>> <[email protected]>wrote:
>>>
>>>> i think u missed a typedef b4... correct me if im wrong
>>>>
>>>>   On Mon, Sep 12, 2011 at 11:10 AM, teja bala <
>>>> [email protected]> 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 <
>>>>> [email protected]> 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 <
>>>>>> [email protected]> 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 [email protected].
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> [email protected].
>>>>>>> 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 [email protected].
>>>>>> To unsubscribe from this group, send email to
>>>>>> [email protected].
>>>>>> 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 [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected].
>>>>> 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 [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected].
>>>> 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 [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> 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 [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to