Guest User

Untitled

a guest
Jun 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void longest_word() {
  4.   int i, j, c, length = 0, longest = 0;
  5.   char arr[] = 20, result[] = 20;
  6.  
  7.   c = getchar();
  8.   while (c != EOF) {
  9.     while (isalpha(c))
  10.       for (i=0; i<???; i++) {
  11.     arr[i] = c;
  12.     length++;
  13.       }
  14.     if arr.length > longest;
  15.     for (j = 0; j<=arr.length; j++) {
  16.       result[j] = arr[j];
  17.     }
  18.   }
  19.   return result;
  20. }
Add Comment
Please, Sign In to add comment