I have implemented the code for the same but it is returning an address.Plz check
Code for the kthnode
@aslesha.j7 cause you are printing the pointer not the data stored in it.
cout<data; // updated line for cout<<knode;
If this resolves your doubt mark it as resolved.
acc to my input value it is returning 4 while it should return 5. Plz check
okay I got it. Thanks