Doubt in the code

please check my code


comment the errors

hello @Adhyayan
image
this should come in else statement.

still answer is wrong


what r u doing inside this while.

that while loop will never run (check intial value of c and condition in while loop)

logic for this program is simple.
kth node from last is equivalen t to n-k th node from start.
so u have to remove n-k th node from start