Intel Corporation interview question

Detecting loop in linkedlist. code it in c/c++