O
onkar
Program 1:
#include<stdio.h>
int main(void){
int *p;
p=(int *)malloc(sizeof(int));
*p=12;
printf("%d %p\n",*p,p);
return 0;
}
I run the program to get the following output :
12 0x80495b8
now
Program 2:
#include<stdio.h>
int main(void){
int *p;
p=0x80495b8;
printf("%d\n",*p);
return 0;
}
what should be the answer "if ,somehow the Process executing the
program 2 is allowed to access all the memory locations of Process
executing on behalf of Program 1 ".
I think it should be 12 ? correct me if I am wrong //
Thank you,
Onkar
#include<stdio.h>
int main(void){
int *p;
p=(int *)malloc(sizeof(int));
*p=12;
printf("%d %p\n",*p,p);
return 0;
}
I run the program to get the following output :
12 0x80495b8
now
Program 2:
#include<stdio.h>
int main(void){
int *p;
p=0x80495b8;
printf("%d\n",*p);
return 0;
}
what should be the answer "if ,somehow the Process executing the
program 2 is allowed to access all the memory locations of Process
executing on behalf of Program 1 ".
I think it should be 12 ? correct me if I am wrong //
Thank you,
Onkar