I think he means to delete tail.
@OP: during a list implementation you will have a lot of transversal and deletion code, for that you might want to make a helper function to make your functions clearer. Also your code doesn't work if there is only 1 element, where the head and the tail point to the same element.
Your function to delete the last element from the linked list is good enough. However, do take note of the issue raised by arkoenig regarding the code
which apparently doesn't appear to be meaningful in the codes given.
Do take note about the existence of other data structures like Stack and Queue which may be a better solution in place of linked list. If you are always looking to delete the last element, you may want to consider using stack. Anyway, it all depends on the problem that you're solving. Happy coding!
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...