Yes, that is a use of trigraphs, which have been legal in C since C89.
http://en.wikipedia.org/wiki/C_trigraph
That will tell you what each ?? sequence corresponds to. Edit
your copy of the source accordingly. Then either use an automatic
code beautifier or a simple text editor to indent the program
into a more readable form.
Having looked at the source code in the posting, I would say that
if your purpose really is just to learn how to understand the code
yourself, that you would be far better off ignoring the code in
that posting and instead sitting down with some paper and a pen
and figuring out how you would write the program, by yourself.
There is little doubt in my mind that the posted code was designed
to be hard to read and understand, likely specifically so that
it could be given to people who asked for code to produce string
permutations, without serious danger that the code would be handed in
as a homework solution, since it should be clear to any marker
that the code was not produced by a student.
It is not uncommon for us to get people claiming that they just need to
produce string permutations as part of something they are doing,
but whom we later find out are looking for a solution to a
homework assignment.
I would go so far as to say that if you continue to indicate that your
purpose in producing permutations is not homework, then it is unlikely
that you will get much (if any) assistance in understanding the code
you were referred to. If you "just want to understand how to do it",
then go ahead and analyze the referenced code on your own --
understanding has no time limit, so there's no problem with
you spending a few months on the task, right? Whereas if you
were at this point to say that Yes, you need this for homework,
then you would lose some points for having previously said otherwis,
but people would become much more open to -teaching- you
(to the extent that you clearly indicated willingness and
ability to learn.)
If you want people to help -teach- you how to create string
permutations, then you should post a summary of what you
have come up with already as to how you would approach the
problem, and you should post -specific- questions about items
you are stuck on. Though if it is the algorithm you are stuck on,
you might get referred to comp.algorithms -- there isn't a whole
lot about producing permutations that is specific to C.
--
"I buy more from my grocer than he buys from me, and I bet it's
the same with you and your grocer. That means we have a trade
deficit with our grocers. Does our perpetual grocer trade deficit
portend doom?" -- Walter Williams