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
When must you use a pointer rather than a reference?
Differentiate between declaration and definition.
What are abstract data types in c++?
Can non-public members of another instance of the class be retrieved by the method of the same class?
What is a set in c++?
What are formatting flags in ios class?
Can you use the function fprintf() to display the output on the screen?
Explain data encapsulation?
Which sort does c++ use?
Should a constructor be public or private?
Is there a c++ certification?
What are the differences between malloc() and calloc()?
Why is polymorphism useful?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
What is searching?