Advertisement
Guest User

unob

a guest
Mar 31st, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.69 KB | None | 0 0
  1. int quux;
  2. // addition
  3. int gen(int foo, int bar) {
  4.   return bar ? gen(foo ^ bar, (foo & bar) << 1) : foo;
  5. }
  6. // multiplication
  7. int doSomethingElse(int foo, int bar) {
  8.   // for (quux = 0; foo > 0; foo = gen(foo, gen(-2, 1)))
  9.   for (quux = 0; foo > 0; foo--)
  10.       quux += bar;
  11.   return quux;
  12. }
  13. int spam;
  14. int main() {
  15.   char text[] = {
  16.     // [0...4] = doSomethingElse(doSomethingElse(2, 5), doSomethingElse(2, 5))
  17.     // [0...4] = doSomethingElse(10, 10)
  18.     [0...4] = 100
  19.   };
  20.   int asdf[] = {
  21.     4,
  22.     1,
  23.     8,
  24.     8,
  25.     11
  26.   };
  27.   for (spam = 0; spam < 5; spam++)
  28.     putchar(text[spam] + asdf[spam]);
  29.   // 100 + 4, 100 + 1, 100 + 8, 100 + 8, 100 + 11
  30.   // outputs "hello"
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement