more specifically,, char *p1 = "in data"; char p2[] = "in stack";
*p1 points to a string literal in process' data area. p2[] is allocated in the current stack and then the string is copied into it as Jain correctly stated,, this "data area" is actually part of the process,,, it's allocated a priori,,, and it's a dump of binary's data chunk. it's not re-allocable, etc. best regards. -- 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/-/NIjOidKZjkYJ. 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.