Brado!
public text v1 · immutable#include <stdio.h>
#include <ctype.h>
char* printuplow(char* word, char* input){
if(input[0] == '\0'){
return;
}
input[0] = toupper(input[0]);
fprintf(stdout, "%s\n", word);
printuplow(word, &input[1]);
input[0] = tolower(input[0]);
fprintf(stdout, "%s\n", word);
printuplow(word, &input[1]);
}
int main(int argc, char** argv)
{
if(argc>1)
{
fprintf(stderr, "%s\n", argv[1]);
printuplow(argv[1], &argv[1][0]);
}
return 0;
}