what is the main purpose of loops? How many types of loops are there?

Answer

Loops are simply used to reduce the number of lines in the code, making it less complex. 

Suppose we want to write Hello 20 times. We can just add a loop in such cases and reduce the no of lines and make the code look short and sweet for better understanding.

3 types of the loop:

1. For

2. While

3. Do-while

All c++ Questions

Ask your interview questions on c

Write Your comment or Questions if you want the answers on c from c Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---