http://blog.chinaunix.net/uid-23629988-id-3035613.html 今天探讨一个很看似简单的API “read”的返回值问题.read的返回值有哪几个值?每个值又是在什么情况下发生的? 先问一下男人吧:man 2 read RETURN VALUE On success, the number of bytes read is returned (zero indicates end of file), and the file pos
#include <stdio.h> int main(void) { long num; long sum = 0L; int status; printf("Please enter an integer to be summed"); printf("(q to quit):"); status = scanf("%ld",&num); ) { sum = sum + num; printf("Please e