Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- //print first not-space symbol
- char get_first(void);
- int main(void)
- {
- char ch = get_first();
- printf("First symbol is %c\n",ch);
- return 0;
- }
- char get_first()
- {
- char c;
- while((c=getchar())!=EOF)
- {
- if (!isspace(c))
- break;
- }
- return c;
- }
Add Comment
Please, Sign In to add comment