Your IP : 216.73.216.40


Current Path : /var/www/html/bibhas.ghoshal/lab_files/
Upload File :
Current File : /var/www/html/bibhas.ghoshal/lab_files/va.c

// Program to print location of main and heap allocated value returned from malloc

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

int main(int argc, char * argv[]) {

    printf("location of code : %p\n", main); 
    printf("location of heap : %p\n", malloc(100e6));

    int x=3;

    printf("location of stack: %p\n", &x);
    return x;

}