edgar 的窝

Happy coding
[Z]VS Debugging : Just My Code

有趣的 C trigraph语法

edgar posted @ 2008年4月06日 16:18 in 编程语言 with tags programming c language trigraph , 1050 阅读

编译运行下面的代码会有什么样的结果^o^

??=include <stdio.h>                         /* #          */
 
int main(void)
??<                                          /* {          */
        char n??(5??);                       /* [ and ]    */
 
        n??(4??) = '0' - (??-0 ??' 1 ??! 2); /* ~, ^ and | */
        printf("%c??/n", n??(4??));          /* \, [ and ] */
        return 0;
??>                                          /* }          */
 

 

 

参考:http://en.wikipedia.org/wiki/C_trigraph

 


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter