pp31.c
来自「开放源码的编译器open watcom 1.6.0版的源代码」· C语言 代码 · 共 24 行
C
24 行
#include "fail.h"
// edit with Windows NOTEPAD!
int main() {
int c;
int pc;
FILE *fp;
fp = fopen( __FILE__, "r" );
pc = '\n';
for(;;) {
c = fgetc( fp );
if( c == EOF ) break;
pc = c;
}
fclose( fp );
// this source file tests terminating C++ comments
// at the end of a file without a newline
if( pc == '\n' ) fail(__LINE__);
_PASS;
}
// this source file tests terminating C++ comments
// at the end of a file without a newline
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?