I think it allocates on each process's stack, so it is not an issue, as each process has got its own stack.
On 10/15/12, bharat b <bagana.bharatku...@gmail.com> wrote: > how can kernel agrees with this ? if we directly access address 60 .. which > is not in our control ... any malicious thing can happen right ? > > On Sun, Oct 14, 2012 at 5:39 PM, Dave <dave_and_da...@juno.com> wrote: > >> @Bharat: 0x notation indicates hexadecimal, so 0x11 = 1*16 + 1 = 17. >> >> Dave >> >> On Sunday, October 14, 2012 12:48:24 AM UTC-5, bharat wrote: >> >>> @Ashok : I didn't get this answer .. >>> i=0x3c --> what is this address .. variables has addresses but not the >>> values right? we are not storing 60 any where right? >>> 0x11 = 3 in decimal format not 11 base 10. >>> >>> typecasting to (int*) needs an address right? >>> I mean >>> int b=10; >>> int * a=(int*)&b; >>> >>> >>> >>> On Sat, Oct 13, 2012 at 9:10 PM, Ashok Varma <verm...@gmail.com> wrote: >>> >>>> This gives a clear explanation: >>>> >>>> #include<stdio.h> >>>> main(){ >>>> int *i,*j; >>>> i=(int*)60; >>>> j=(int*)71; >>>> >>>> >>>> printf >>>> <http://www.opengroup.org/onlinepubs/009695399/functions/printf.html>("%p >>>> %p %d",i,j,j-i);} >>>> >>>> >>>> op: 0x3c 0x47 2 >>>> >>>> 0x47 - 0x3c = 0x11 and hence j-1 = 2 (11/4 = 2, size of int = 4 bytes) >>>> >>>> >>>> On Sat, Oct 13, 2012 at 3:36 PM, bharat b >>>> <bagana.bh...@gmail.com>wrote: >>>> >>>>> #include<stdio.h> >>>>> main() >>>>> { >>>>> int *i,*j; >>>>> i=(int*)60; >>>>> j=(int*)71; >>>>> printf("%d",j-i); >>>>> } >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Algorithm Geeks" group. >>>>> To post to this group, send email to algo...@googlegroups.com. >>>>> To unsubscribe from this group, send email to algogeeks+...@** >>>>> googlegroups.com. >>>>> >>>>> For more options, visit this group at http://groups.google.com/** >>>>> group/algogeeks?hl=en >>>>> <http://groups.google.com/group/algogeeks?hl=en>. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group. >>>> To post to this group, send email to algo...@googlegroups.com. >>>> To unsubscribe from this group, send email to algogeeks+...@** >>>> googlegroups.com. >>>> >>>> For more options, visit this group at http://groups.google.com/** >>>> group/algogeeks?hl=en <http://groups.google.com/group/algogeeks?hl=en>. >>>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/algogeeks/-/b1AQOc8Y9wQJ. >> >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- With love and regards, Sairam Ravu I M.Tech(CS) Sri Sathya Sai Institute of Higher Learning "To live life, you must think it, measure it, experiment with it, dance it, paint it, draw it, and calculate it" -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.