fork(1) download
  1. #include <stdio.h>
  2. #include <ctype.h>
  3.  
  4. void strupr(char *str) {
  5. while (*str) {
  6. *str++ = toupper(*str);
  7. // str++;
  8. }
  9. }
  10.  
  11. int main(void) {
  12. char texto[] = "teste";
  13. strupr(texto);
  14. printf("%s", texto);
  15. return 0;
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 2112KB
stdin
Standard input is empty
compilation info
prog.c: In function 'strupr':
prog.c:6:13: error: operation on 'str' may be undefined [-Werror=sequence-point]
         *str++ = toupper(*str);
             ^
cc1: all warnings being treated as errors
stdout
Standard output is empty