X-Git-Url: https://www.kengrimes.com/gitweb/?p=henge%2Fwebcc.git;a=blobdiff_plain;f=style%2Fsnippets%2Fpointer_array.c;fp=style%2Fsnippets%2Fpointer_array.c;h=913f3b67e098bc4ccee1c019eb1ce41d85730374;hp=0000000000000000000000000000000000000000;hb=f8d924b76a3dfbaaa9e92dacbc4992a7ab6dc8f2;hpb=ada6f5931a7e11cda077c17f7e1fb3b0cac20fb7 diff --git a/style/snippets/pointer_array.c b/style/snippets/pointer_array.c new file mode 100644 index 0000000..913f3b6 --- /dev/null +++ b/style/snippets/pointer_array.c @@ -0,0 +1,11 @@ +/* Inverse 2d array population */ +#include +int main(void); +int main() +{ int** ipp,* ip,* ipa[16], ia[16<<4], i; + for (ipp = ipa, i = 0; ((*ipp++ = ip = ia + (i++ << 4)) - ia < 16 << 4);) + { while ((*ip++ = ip - ia) < (ipp - ipa) << 4) + printf("%i\n",*(ip-1)); + } +} +