What is for loop and its syntax?



What is for loop and its syntax?..

Answer / Swati Passi

A 'for' loop in programming is used to iterate over a sequence of values, such as an array or a range. Its syntax is:<br>```nfor (initialization; condition; increment/decrement) {n // code block to be executed on each iterationn}n``

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is the difference between static polymorphism and dynamic polymorphism?

1 Answers  


What is a superclass in oop?

1 Answers  


Name a typical usage of polymorphism

3 Answers  


What are the advantages of polymorphism?

1 Answers  


What is byval and byref? What are differences between them?

1 Answers   HCL, Wipro,


can we create and enter the data & hide files using programmes ?

2 Answers   Wipro,


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

1 Answers  


What do you mean by binding of data and functions?

3 Answers  


what is object slicing?

9 Answers   L&T, Wipro,


What is balance factor?

1 Answers  


Why multiple inheritance is not possible?

1 Answers  


What is inheritance and how many types of inheritance?

1 Answers  


Categories