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

How many different levels of pointers are there?

1150


Which ide is best for c++?

990


what are the iterator and generic algorithms.

1883


What is the identity function in c++? How is it useful?

995


What is void pointer in c++ with example?

1023


In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that

1034


How many ways can a variable be initialized into in C++?

970


Is linux written in c or c++?

992


What does I ++ mean in c++?

1034


Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

4071


What is basic if statement syntax?

1009


Why is c++ is better than c?

908


Write a program to find the Fibonacci series recursively.

1024


What doescout<<(0==0) print out a) 0 b) 1 c) Compiler error: Lvalue required

930


What is the use of :: operator in c++?

1058