Zscaler Interview Question

Bubble sort, Socket program, Why we use Infinite loop.