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

Find the middle node in the linked list??
(Note:Do not use for loop, count and count/2)

Answer Posted / santhoshr

It wont work exactly if the no of nodes is not given!!! So
better answer is having two pointers from first itslf.
And like this , another question is there,
to find the pth node from last!! That too haas the same logic!!!

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can a program be made to print the name of a source file where an error occurs?

1186


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

1000


What is c definition?

1210


Explain what is the difference between text files and binary files?

1116


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

2062


Do string constants represent numerical values?

1344


Which are low level languages?

1059


If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..

1994


What is the difference between volatile and const volatile?

948


Why & is used in scanf in c?

1060


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

1186


what do u mean by Direct access files? then can u explain about Direct Access Files?

2053


GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

1848


Why is %d used in c?

969


#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }

1083