fork download
  1. #include <stdio.h>
  2.  
  3. int main () {
  4. char frase[200];
  5. scanf(" %[^\n]200s", frase);
  6. char *palavra;
  7. char c;
  8. for (palavra = (char *)0; (c = *frase); ((char *)frase)++) if (c == ' ') palavra = (char *)frase;
  9. printf("%s", palavra);
  10.  
  11. }
  12.  
  13. //https://pt.stackoverflow.com/q/271902/101
Compilation error #stdin compilation error #stdout 0s 9432KB
stdin
 teste de palavras pegando a ultima
compilation info
prog.c: In function ‘main’:
prog.c:8:60: error: lvalue required as increment operand
     for (palavra = (char *)0; (c = *frase); ((char *)frase)++) if (c == ' ') palavra = (char *)frase;
                                                            ^~
stdout
Standard output is empty