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...

Implement a function that returns the 5th element from the
end in a singly linked list of integers in one pass.

Answer Posted / vignesh1988i

let us assume that we have created a linked lists ..... the
no. of nodes is say 15.
count=15;
printf("enter the node do you wann to look out :\n");
scanf("%d",&i);
if(i>count || i>=0)
printf("no node exists like this \n");
else
{
i=count-i;
view_node(i);
printf("%d",HEAD1->data);
}
getch();
}
void view_node(int i)
{
HEAD1=HEAD;
for(int k=1;k<i;k++)
HEAD1=->HEAD1->ptr;
}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the steps to insert data into a singly linked list.

1033


What is string concatenation in c?

1042


write a progrmm in c language take user interface generate table using for loop?

2008


how to write optimum code to divide a 50 digit number with a 25 digit number??

3213


What are keywords c?

991


i want to know the procedure of qualcomm for getting a job through offcampus

2425


Tell me what is the purpose of 'register' keyword in c language?

976


Which is the memory area not included in C program? give the reason

1907


What is #include stdio h?

1072


What is function definition in c?

1030


What is a structure member in c?

966


How can you increase the size of a statically allocated array?

1054


What is the difference between test design and test case design?

2048


When can you use a pointer with a function?

1012


Are there namespaces in c?

1069