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 / mms zubeir

I got it, thank you.

but one suggestion, instead of using

printf("Tenth last element is %d",nodes[(pos-10)%10]->data);

you can simply give,
printf("Tenth last element is %d",nodes[pos%10]->data);

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I get good at c++ programming?

1084


What are maps in c++?

903


What is the use of c++ programming language in real life?

978


Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

938


Is sorted c++?

1050


What are separators in c++?

1035


What is this pointer in c++?

1308


write a function signature with various number of parameters.

989


What does it mean to declare a member function as static?

1014


What is the difference between C and CPP?

1099


write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

1824


What is c++ library?

993


What is flush () in c++?

1034


How are Structure passing and returning implemented by the compiler?

1057


How the delete operator differs from the delete[]operator?

1049