All pastes #884943 Raw Edit

Anonymous

public text v1 · immutable
#884943 ·published 2008-01-30 18:01 UTC
rendered paste body
#include <stdio.h>
#include <stdlib.h>


int main();
char *j;


/*void test(int i){ // Function parameter

		char buf[12]; // local variable

}*/



/*void test(int i){

	char buf[12];



	printf("&i = %p\n", &i);

	printf("&buf[0] = %p\n", buf);

	getchar();
}*/

void test(int i){

	char buf[12];



	printf("&main = %p\n", &main);

	printf("&i = %p\n", &i);
	printf("&buf[0] = %p\n", &buf);
	for(j = buf - 8; j < ((char *) &i) + 8; j++){
		printf("%p: 0x%x\n", j, *(unsigned char *) j);
	}
}



int main(){

	test(12);

}