#include <stdio.h>
extern const char source[];
int main()
{
printf("%s", source);
return 0;
}
asm(
".section .rodata\n"
".global source\n"
"source:\n"
".incbin \"" __FILE__ "\"\n"
".byte 0\n"
);
Wikipedia says a quine receives no input, and I know that, for this reason, a program which reads its own source code from a file doesn't count. The above program does simply read its own source code and print it to standard output, but it's part of the program itself. Traditional quines also typically have strings embedded in the same place, perhaps even the entire source code/output if there's a particularly aggressive optimizer involved.
This program does load its source code from the file to display it...but it does so at compile time, so the program still doesn't take input. So is it a quine or not?