Explain the FOR loop with a help of a code.



Explain the FOR loop with a help of a code...

Answer / Prakash Kumar Jha

A For loop is a control structure used in C++ to iterate a specific number of times. Here's an example:
```
for(int i = 0; i < 10; i++) {
cout << i << endl;
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

C++ Public access specifier instead of Private – What is bad ?

1 Answers  


How to invoke a C function using a C++ program?

1 Answers   Alter,


How to run C++ program in cmd

1 Answers  


what is a pragma in C++?

1 Answers   Aspire,


Explain about Searching and sorting algorithms with complexities

1 Answers   Accenture,


How to generate random numbers in C++ with a range?

1 Answers  


Write a program that ask for user input from 5 to 9 then calculate the average

1 Answers   IBS,


What are string library functions(syntax).

1 Answers   Accenture,


Is there a difference between class and struct?

1 Answers  


What is the purpose of a constructor? Destructor?

1 Answers   Amazon,


Write a C++ Program to find Square Root of a number using sqrt() function.

1 Answers  


When would you use a pointer? A reference?

1 Answers   Amazon,


Categories