I guess he means only the first node of the link is being printed. As i said
memory is not allocated to the next node while creating the list.
He is allocating to temp. Whereas temp already points to head in the if()
condition
Thanks and regards,
Praveen S

On Sat, Mar 7, 2009 at 8:58 PM, John Matthews <[email protected]> wrote:

>   --- In [email protected] <c-prog%40yahoogroups.com>, "Gaurav"
> <mahajan.gau...@...> wrote:
> >
> > I have this prog....but it prints only the 1st no....
> > I am unable to understand y?
> >
> > printf("\n 1. Create \n 2. Print: ");
> > scanf("%d",&ch);
>
> If you mean that you only see option 1, try:
>
> printf("\n 1. Create \n 2. Print: ");
> flushall();
> scanf("%d",&ch);
>
>  
>


[Non-text portions of this message have been removed]

Reply via email to