Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ challenge

Name: Anonymous 2011-02-09 9:52

write a program to test, whether the stack grows upwards or downwards

I don't give a fuck about your exotic architecture and neither does anybody else. so please fuck off, ``faggot''.

Name: Anonymous 2017-02-04 1:53


#include <stdio.h>
#include <stdlib.h>

long p1, p2;

void f2() {
int x = 27;
p2 = (long) &x;
}
void f1() {
int x = 5;
p1 = (long) &x;
f2();
}


int main(void) {
f1();
printf("The stack grows %s.\n", p2 > p1 ? "upwards" : "downwards");
return(EXIT_SUCCESS);
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List