Path: utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!aurs01!varnell From: varnell@aurs01.uucp (Mark Varnell) Newsgroups: comp.lang.c Subject: need way to find all character combinations in a string Message-ID: <59459@aurs01.UUCP> Date: 20 Jan 91 16:34:23 GMT Sender: news@aurs01.UUCP Organization: Alcatel Network Systems, Raleigh NC Lines: 17 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 * ***********************************************