need way to find all character combinations in a string

Mark Varnell varnell at aurs01.uucp
Mon Jan 21 03:34:23 AEST 1991


I am looking for help on a c programming class assignment.
I am suppose to write a program that takes an input string array,
up to six characters maximum, and print all combinations of the
characters in the string. For example, if "cat" in the input,
the output would be something like this:
cat cta atc act tca tac

Also, each output word, as it is generated, needs to be available in
a tmp string so I can do other things to it which isn't part of
this help request. 
Can anybody out there in netland suggest a simple
algorithm for finding the combinations in the string?

Thanks in advance...
***********************************************
*  MARK VARNELL      ...mcnc!aurgate!varnell  *
***********************************************



More information about the Comp.lang.c mailing list