c++ continue versus break

前端 未结 6 1022
抹茶落季
抹茶落季 2020-12-16 15:02

Which statement will be executed after \"continue\" or \"break\" ?

for(int i = 0; i < count; ++i)
 {
     // statement1                                            


        
6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-16 15:27

    1. For continue, innerloop is executed with new i,j values of i,j+1

    2. For break, innerloop is executed with new i,j values of i+1,0

    ofcourse if boundary conditions are satisfied

提交回复
热议问题