[SLUG] [PIG] Guess That Function #1

From: Dylan William Hardison (dylanwh@gmail.com)
Date: Mon May 01 2006 - 15:28:46 EDT


I figured every once and a while, someone can post a snippet of code,
in whatever language they like, and have people try to guess what it
does.
Two guidelines: The function's name should be 'f' as to note give away
its meaning (unless the language in question makes the name 'f'
impossible), and the language used must be stated.

So, guess what this C-language function does:
int f(void)
{
    long one = 1;
    return ! ( *((char *)(&one)) );
}

I'll give you a hint: It either returns 1 or 0, depending on what you
compile it on.

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:31:16 EDT