This Code print thefirstoccurrences of x,
Modify the code to print thelastoccurrences of x and print how many times it exists? ( with explanation for each line if possible) many thanks.
Extracted text: We now present a function search(list , x) that returns a pointer to the first occurrences of x within the linked list list and the NULL pointer if x does not occur in the linked list. NODEPTR search(NODEPTR list , int x) { NODEPTR p; for(p=list ; p!=NULL; p=p-> link) if (p->info ==x) return (p); return (NULL); }
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here