fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. char str[6] = "UTFPR";
  6. for (int j = strlen(str); j >= 0; j--) {
  7. for (int i = 0; i < j; i++) {
  8. str[j] = '\0';
  9. printf("%s\n", str + i);
  10. }
  11. }
  12. }
  13.  
  14. //https://pt.stackoverflow.com/q/323222/101
Success #stdin #stdout 0s 4372KB
stdin
Standard input is empty
stdout
UTFPR
TFPR
FPR
PR
R
UTFP
TFP
FP
P
UTF
TF
F
UT
T
U