International C Language Chaos Code contest __c language
Source: Internet
Author: User
The International C Language Chaos Code Contest (IOCCC) is an annual competition that has lasted since 1984. It was held in Usenet by Landon Curt and Larry Bassel, who received entries in the winter, judged in the spring and announced the winners in the summer.
The winner of the 1988 is a messy version of the CDECL program, the author of which is Gopi Reddy. Recall that the CDECL code is probably 150 lines, and the messy version of the code has only 12 lines.
Here's the messy code:
#include <stdio.h>
#include <ctype.h>
#define W printf
#define P While
#define T (s) (W=t (s))
CHAR*X,*B,*L,I[99]; M,w,v;d () {w==9? ( W ("'%.*s ' is
", v,x), T (0)): w==40?
(t (0), D (), T (a)): W==42? (t (0), D (), W ("PTR to"): 0;p (w==40?) ( T (0),
W ("Func returning"), T (): w==91? (t (0) ==32? (W ("array[0..%d]
of ",
Atoi (X)-1), T (0)): W ("Array of"), T (93)): 0); Main () {p ("Input:
"),
B=gets (I)) if (t (0) ==9) l=x,m=v,t (0), D (), W ("%.*s./n/n", m,l); T (s)
{if (!s| | S==W)
{p (*b==9| | *B==32) b++; X=b; V=0;if (W=isalpha *b) 9:isdigit (*b)? 32
:* b++)
if (w<33) p (isalnum (*b)) b++,v++;} return W;}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.