Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void longest_word() {
- int i, j, c, length = 0, longest = 0;
- char arr[] = 20, result[] = 20;
- c = getchar();
- while (c != EOF) {
- while (isalpha(c))
- for (i=0; i<???; i++) {
- arr[i] = c;
- length++;
- }
- if arr.length > longest;
- for (j = 0; j<=arr.length; j++) {
- result[j] = arr[j];
- }
- }
- return result;
- }
Add Comment
Please, Sign In to add comment