-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Week1-C-chapter1 #1
Comments
1-6明白了。 |
以后记着写好的程序要自己运行测试通过,不能仅仅保证编译没错,实在找不到错误的,可以问我。
|
No activity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#define EOF (-1)
),即-1。int c1 = NULL;
这种写法,虽然本身是合法的(本质上#define NULL (0)
),但看起来很别扭,NULL一般只用来给指针型变量赋值或初始化,表示空指针。3.练习1-9、1-10中
getchar(c)
错误,getchar的标准函数签名是int getchar();
,你这样写编译不会报错吗?程序执行的结果正确吗?while ((len - getline(line, MAXLINE)) > 0)
写错了吧,你是想写while ((len = getline(line, MAXLINE)) > 0)
吧,自己测试过结果吗?不能只保证编译通过啊。else if (c == '\'' || c == '""')
这个'""'是什么?单引号引起来的只能是一个字符,转义字符只是写起来是两个字符,实际上本身表示一个字符,比如'表示',\t表示水平制表符The text was updated successfully, but these errors were encountered: