struct node{ int data; struct node *next;};i write just function here int count(struct node *pp){ struct node *start; int count=0; start=pp->next; while(start->next!=pp) { start=start->next; count++; } return count;}
Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.
Copyright ©2003-2010 CoolInterview.com, All Rights Reserved. Privacy Policy | Terms and Conditions Page URL: http://www.coolinterview.com/interview/5957/default.asp?cachecommand=bypass