Guest User

Untitled

a guest
Nov 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. void getWord(char *s, int lenght)
  2. {
  3.  
  4. int i;
  5. for (i=0; i < lenght; i++)
  6. {
  7. s[i] = getchar();
  8. if (s[i] == '\n')
  9. {
  10. s[i] = '\0';
  11. return;
  12. }
  13. }
  14. s[lenght-1] = 0;
  15. }
Add Comment
Please, Sign In to add comment