Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- typedef char string[100];
- void substrings(string str) {
- if (strlen(str) >= 1) {
- puts(str);
- substrings(str + 1);
- }
- }
- void todas_substrings(string str) {
- int tam = strlen(str);
- if (tam >= 1) {
- substrings(str);
- str[tam - 1] = '