Recursive Complexity

Thoughts and musings of a programmer and wanna be entrepreneur

Find Direction Of Growth Of Stack In C

leave a comment »

#include <stdio.h>

typedef unsigned long long UINT64;

UINT64 f(int b){
    return (UINT64)&b;

bool downwards(int a)
    int b = 0;

    if ((&a - f(b)) < 0)
        return false;
        return true;

int main(int argc, char* argv[])
    int a = 0;

    if (downwards(a))

    return 0;

Written by Vivek S

March 27, 2013 at 5:07 am

Posted in Tech

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

TED Blog

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

%d bloggers like this: