(sizeof(struct)); ??
>

That doesn't makes sense. Size of struct is what ?? you need the size of
your structure with the variables you have declared in it.


>
> cos malloc returns pointer to memory block and nodeptr itself is a pointer
> and you have used nodeptr* further?
>
>
>
> On Tue, Aug 9, 2011 at 6:32 PM, siddharth srivastava 
> <akssps...@gmail.com>wrote:
>
>>  @sidharth: thanks a lot for correcting me :)
>>> @aditya : no. there was some mistake;
>>>
>>> in the code i pasted above it's giving segmentation fault. Is it cause
>>> i'm initializing h without using malloc??
>>> Please throw light on this problem
>>>
>>
>> Pointer points to a location in memory. You can't use h without making h
>> to reference to some area in memory.
>>
>>
>>
>>> And in the following code
>>> char *s;
>>> scanf("%s", s);
>>> why isn't it possible to store a string in s??
>>>
>>> Please explain both concepts.
>>>
>>> --
>>>  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.
>>>
>>
>>
>>
>> --
>> Regards
>> Siddharth Srivastava
>>
>>
>>
>> --
>> 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.
>>
>
>
>
> --
>  "People often say that motivation doesn't last. Well, neither does
> bathing - that's why we recommend it daily."
>
>  --
> 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.
>



-- 
Regards
Siddharth Srivastava

-- 
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.

Reply via email to