返回首个非空白字符的函数???
下面是我自己写的,可是不对,请问应该怎么写啊?谢谢!程序代码:
#include <stdio.h> #include <stype.h> int main (void) { char ch; ch = get_first(); putchar(ch); putchar('\n') return 0; } char get_first (void) { int ch; char c; c = getchar(); if(!isspace(c)) ch = c; while (getchar() != '\n') continue; return ch; }