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 explain class & object in c++?
Do inline functions improve performance?
How is c++ used in the real world?
What is c++ virtual inheritance?
What is doubly linked list in c++?
What is a float in c++?
What is meant by the term name mangling in c++?
What do you know about near, far and huge pointer?
What is the type of 'this' pointer? When does it get created?
What is c++ code?
How const int *ourpointer differs from int const *ourpointer?
What's the order in which the objects in an array are destructed?
What is setbase c++?
Do the names of parameters have to agree in the prototype, definition, and call to the function?
What is extern c++?