Does a quine print the ACTUAL code of the program i.e not obfuscated or does it print the obfuscated program?
I don't think obfuscation has anything to do with it. Usually a quine prints the actual source code of the program itself.
Here is an actual quine in standard C, found at Wikipedia:
main() { char *s="main() { char *s=%c%s%c; printf(s,34,s,34); }"; printf(s,34,s,34); }
You will notice that its structure is relatively straightforward. It uses a string constant containing the text of the program as both the format string and one of the values to be formatted by printf()
.
When compiled and run, it prints exactly that single line of code.
There are examples of quines in a variety of languages, including several more in C, at the wiki article.
Suppose that you had a C program which prints an "obfuscated" or otherwise cosmetically modified version of its source. For example, suppose there's a difference in whitespace or variable names.
Then that program would not be a quine, since by definition a quine is a program which prints itself, and by "itself" we mean the exact same sequence of bytes. But the output of that program, once compiled, would print the same thing as the original program (since it's just a cosmetic variant), i.e. itself. So the output is a quine.
This sometimes eases the process of writing a quine - just write a "nearly-quine", which maybe doesn't get the formatting exactly right, run it once, and the output is your actual quine.
This is all assuming a quine in C. A quine in x86 machine code would have to output not its C source, but the same sequence of bytes that makes up the .exe file.
I'm not sure what you mean by "ACTUAL code" as opposed to "obfuscated code", but to test whether something is a quine or not, you have to decide what language it's supposed to be a quine in. Maybe by deciding that you can answer your own question - do you just want a quine in C, or a quine that has something to do with your obfuscator?