Are multiple conditions allowed in a for loop?

前端 未结 5 979
無奈伤痛
無奈伤痛 2020-12-14 13:26

The following code runs without giving any errors or warnings

#include

int main(){
    int i, j;
    int p = 0, q = 2;
    for(i = 0, j = 0;          


        
5条回答
  •  遥遥无期
    2020-12-14 14:20

    Even I have read That Book by Mr Yashwant Kanetkar. It do says that only one condition is allowed in a for loop, however you can add multiple conditions in for loop by using logical operators to connect them. In other books that I have Read Along time Ago, said that only one condition is allowed.

提交回复
热议问题