可打印自身代码的代码
代码如下:
#include <stdio.h> void main() { char *s="#include <stdio.h>%cvoid main()%c{%c%cchar *s=%c%s%c;%c%cprintf(s,10,10,10,9,34,s,34,10,9,10);%c}"; printf(s,10,10,10,9,34,s,34,10,9,10); }
/*
* 注: 10是字符'\n', 34 是字符'"', 9是字符'\t'
*/
[[it] 本帖最后由 hoodlum1980 于 2008-3-19 00:06 编辑 [/it]]