title: How to point to the previous node of the current node and the next node of the current node in C?
body: <p>Till now, in Linked List, I have only used a single <code>temp</code> node to traverse a given linked list for different operaitons which is very easy. </p>
  
  <p>Now an assignment of a book demands to write a C code where the user input would be a number in the list and we have to compare the number just before the given number and the number just after the given number and tell which one is greater or equal, in case. For that, according to me, we need two pointers viz. <code>prev</code> and <code>next</code> on both side of <code>current</code> node to point to the two numbers at the different nodes and then collecting there data part we can compare them. But I can not code this part in C. So a code snippet to point to the required nodes would be helpful.</p>