pls sir can you give details and more info about forloop
If it's general knowledge about the for loop you want, I will be more than happy to provide some insight. If it is a specific problem involving for loops, I will also be more than happy to help, if you provide enough information. So here we go:
A for loop is a C++ operation that is based on 3 conditions. The first is initialization, the second is the terminating condition, and the third is the update.
For loops are processor friendly when referring to speed. They can be used to do things like index arrays, which can save considerable amounts of typing code. Here is an example:
array = 0;
array = 1;
array = 2;
.... and so on can be converted to
for(int i = 0; i < 4; i++)
array[i] = i;
Notice the 3 steps: initializing i to 0, the terminating condition is when i is no longer less than 4, and the update increments i.
I hope this information was helpful.