Pregunta de entrevista de Capgemini

Differentiate between a for loop and a while loop? What are it uses?

Respuesta de la entrevista

Anónimo

20 de jun de 2012

for loop statement is divided into three sections each one is followed by termination sign(i.e. semicolon) . Syntax:- for(initialization;condition;iteration) { //body of the loop } initialization-In this section we initialize the variable by assigning certain value to it.example - int i=0 condition- it is like that -i=1) { cout <

1