Intel Corporation Interview Question

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