Puzzle: Complete the C Code Block

A very simple and trivial question:

I am giving a C code block that you need to complete. Here it is:

if(______) {
  printf(" Fair ");
}
else {
  printf(" Isaac ");
}

The question is this:

Propose a condition for the if statement so that the output of the block is Fair Isaac.

Popularity: 6% [?]

Related posts:

  1. My Code Rules – Code Documentation Check
  2. Cipher Block Chaining
  3. Electronic Code Book
  4. Finally Into RnD
  5. Variadic Functions

  • Guest

    if(printf("Fair")==0)

  • Varun Bhalla

    if(!printf("Fair")) {2. printf(" Fair ");3.}4.else {5. printf(" Isaac ");6.}So simple!!

  • http://blog.singhanuvrat.com Anuvrat

    Haven't been able to do it in java though. You think it's possible?

  • st0le

    Hello, Anuvrat,Here's a java solution for your problem, enjoy!http://pastebin.com/PKu0u1pt (incase the formatting gets screwed) if(new Object() { public boolean foo() { System.out.print("Fair "); return false; } }.foo()) { System.out.print("Fair"); }else { System.out.print("Issac"); }

  • st0le
  • http://blog.singhanuvrat.com Anuvrat

    Wiow!! Thanks a lot. I really liked this solution.