LL k reverse: My code is not working

LL k reverse my code ia not working plz chack the code and do the changes

problem : https://online.codingblocks.com/app/player/39658/content/37376/4753/code-challenge

code :

@sengarankit98 it is giving runtime error due to temp2 pointer you intialized it with NULL pointer and then trying to access it next node. so fix that i did not get the propose of using temp1 and temp 2 pointer so please comment your code. and try to use recursion approch too for solving this problem that is efficient and very clean approch for solving this dont mess up with too many pointers.