89 循环条件的另一种写法

#include<stdio.h>
#include<stdlib.h>
void main() {

FILE*read = fopen("2", "r");
if (!read) {
printf("打开失败 ");
system("pause");
return;
}
char teamp[200] = { 0 };

int cbbc = NULL;
while (!feof(read)) {
fgets(teamp, sizeof(teamp), read);
int llyy = ftell(read);
if (llyy != cbbc) {
printf("%s", teamp);
}
}
fclose(read);
system("pause");
}

start
l_start


只要循环体的条件是类型.

xx == 0{ 执行里面的代码}
我们都可以写成
!xx{执行里面的代码}  逻辑非运算

原文地址:https://www.cnblogs.com/xiaodaxiaonao/p/9034123.html