Question: Please use c++ 4 Implement the following function as a new function for the linked list toolkit. (Use the usual node definition with member variables
4 Implement the following function as a new function for the linked list toolkit. (Use the usual node definition with member variables called data and 1ink.) (S points) size-t count-42s (const node* head-ptr); Precondition: head ptr is the head pointer of a linked list Il The list might be empty or it might be non-empty / Postcondition: The return value is the number of occurrences / of 42 in the data field of a node on the linked list. / The list itself is unchanged. 5. Suppose that I have the following declarations: int data[1001 size t Write a small segment of C++ code that will shift data [51 .data [99] down one spot to the locations data [501.data [98]. The value of data [991 remains at its original value. (5 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
