What is difference between for and for each loop.Please explain with a example.
a for loop is a construct that says "perform this operation n. times". a foreach loop is a construct that says "perform this operation against each value/object in this IEnumerable"