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
What does std mean in c++?
Which one is better- macro or function?
What do you mean by public protected and private in c++?
What is purpose of new operator?
Why would you use pointers in c++?
Define pre-condition and post-condition to a member function in c++?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create
What is operator overloading in c++ example?
What apps are written in c++?
Can char be a number c++?
How many static variables are created if you put one static member into a template class definition?
Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
What is the difference between strcpy() and strncpy()?
Why do we use vector in c++?
Const char *p , char const *p What is the difference between the above two?