simple difference between for and foreach
for loop is working with values.it must have condition then increment and intialization also.you have to knowledge about 'how many times loop repeated'.
foreach is working with objects and enumaretors. no need to knowledge how many times loop repeated.