为什么总是245,好郁闷。。。
程序代码:
#include < stdio.h > #include < stdlib.h > void main ( ) { char string [81]; int i, sum = 0; char c; gets ( string ); for ( i = 0; ( c = string[i]) != '\n'; i++ ) sum = sum +1; printf ( "%d", sum ); system ( "pause" ); }