I am printing out a linked list in reverse using recursion. |
That is a simple, clear task.
I am not allowed to create a new node in order to create the list. |
What?
First, printing a list has nothing to do with creation of a list. They are entirely separate operations.
Second, if a list is a linked set of nodes, and you are not allowed to have nodes, then you cannot have any list either. Either you have not understood the assignment correctly or you fail to explain it to us properly.
Are you asking whether the code that you show is correct?
It is not.
Line 1: main() must return int, not void.
Line3: What is the type of "arr1"?
Line4: What is the type of "arr2"?
Line5: We have no idea what the "initlist" does, nor what the "list1" is.
Line6: There is no excuse to have that.
Line7: We have no idea what the "create" does, nor what the "a1" is.
We hav no idea what the "list2", "a2", "list3" and "list4" are.