int n = 5;
for(int i = 0;i!=n;i++)//condition !=
{
//executing 5times
}
int n = 5;
for(int i = 0;i<n;i++)//condition <
{
//executing 5times
}
Which one is preferred?
This was example from "Accelerated C++ : practical programming by example / Andrew Koenig, Barbara E. Moo." Just wanted to know why the Author prefers the first one