Recursive Complexity

Thoughts and musings of a programmer and wanna be entrepreneur

Posts Tagged ‘technology

What’s wrong with this piece of code ?

with 6 comments


struct foo {
    int a, b;
};

void kstrtol(long *x)
{
    *x = -1;
}

int main(void)
{
    struct foo foo;
    foo.b = 42;
    kstrtol((long *)&foo.a);
    return 0;
}

Advertisements

Written by Vivek S

July 23, 2013 at 4:02 pm

Posted in Tech

Tagged with , , , ,

TED Blog

The TED Blog shares interesting news about TED, TED Talks video, the TED Prize and more.