After execution of the code fragment

int temp[5];

int i;

for (i = 0; i < 5; i++)

{

temp[i] = i + 2;

if (i >= 3)

temp[i-1] = temp[i] * 3;

}

cout << temp[3];

what is displayed on the screen?


can someone help me what will the output be i got 6 but i dont know if im right

Respuesta :

yes the output is 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  





ACCESS MORE