Skip to content

Instantly share code, notes, and snippets.

@ichaos
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save ichaos/11029901 to your computer and use it in GitHub Desktop.

Select an option

Save ichaos/11029901 to your computer and use it in GitHub Desktop.
Print China map
/*
* Magic code to print china map.
* The original idea is from International Obfuscated C Code test, check more here.
* http://stackoverflow.com/questions/3533348/how-does-this-code-generate-the-map-of-india
*/
#include <stdio.h>
int main(){int a,b,c; for (b = c = 10; (a =
"-FIGURE?,China *CJ Hello Folks,\
b&M\"D(G*>/#\";,B1:0=12<924;554D\
*76`<W#!?UEZ>YCWEWFTJOP$%CXAX@Z?\
\\#(/&!e)s z#F"[b+++21]); )
for(; a-- >32 ; ) putchar ( ++c=='d' ? c = c/10:32|(b&1?0:10)); return 0; }
/*
******
** ********
********** *************** **
************ *****************
**************** *****************
**************************** ******************
*************************** *********************
************************************ ***********************
****************************************************************
******************************************************* *
*****************************************************
**********************************************************
*********************************************************
*******************************************************
*******************************************************
****************************************************
***********************************************
**** ***********************************
*********************************
********************************
*******************************
*** *************** *
*********
***
*/
@larryxiao

Copy link
Copy Markdown

cool! but how do you generate the char strings..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment