Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Memory is not a constraint. In a single iteration(NOTE: you
can't go back), how will you find out the 10th last
node/item in a linked list.

Answer Posted / rohith

it can be just done tis way!!
temp=first;
while(temp->link->link->link->link->link->link->link->link-
>link!=NULL)
{
temp=temp->link;
}
printf("%d",temp->data);

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When must you use a pointer rather than a reference?

1033


Differentiate between declaration and definition.

1046


What are abstract data types in c++?

980


Can non-public members of another instance of the class be retrieved by the method of the same class?

1075


What is a set in c++?

969


What are formatting flags in ios class?

1287


Can you use the function fprintf() to display the output on the screen?

1245


Explain data encapsulation?

1126


Which sort does c++ use?

1017


Should a constructor be public or private?

1030


Is there a c++ certification?

1055


What are the differences between malloc() and calloc()?

1176


Why is polymorphism useful?

1069


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

1180


What is searching?

1120