So, what are Loops? Basically, Loops are used for repeating the same codes multiple times, i.e. executing same codes multiples. Let's learn it with the help of an example. Suppose you need to print Hello 15 times on the screen. The Simple way is to write printf function 15 times with the "Hello". So it will print Hello 15 times. But what if you want to print Hello 1000 or infinite times, then at that time, Loops are used.