what is Loop function? What are different types of Loops?



what is Loop function? What are different types of Loops?..

Answer / Santosh Kumar Dixit

A loop function allows code to repeat a specific section multiple times. In C++, there are three main types of loops: for loop, while loop, and do-while loop. For example, the for loop can be used to iterate through an array: for (int i = 0; i < 10; i++) { cout << i << 'n'; }

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Can we use this pointer inside static member function?

1 Answers  


How are pointers type-cast?

1 Answers   iNautix,


What is the use of default constructor?

1 Answers  


What is the need of a destructor? Explain with the help of an example.

1 Answers  


What is the cout in c++?

1 Answers  


Which field is used in c++?

1 Answers  


What is difference between array and vector in c++?

1 Answers  


write infinite loop in C++ which does not use any variable or constant?

3 Answers  


How does class accomplish data hiding in c++?

1 Answers  


Does improper inheritance have a potential to wreck a project?

1 Answers  


Are php strings immutable?

1 Answers  


What is private public protected in c++?

1 Answers  


Categories