堆和栈地址——eclipse linux实践

char  a[] = " as " ;栈,或全局常量
char   * a2 = " das " ;字符常量 
string   * s = new   string ( " da " );堆 
printf(
" %p %p %p %p " ,a,a2,s, & " as " 字符常量);
0xbfa9b994栈或0x8049d88全局常量 0x8048a50字符常量 0x85ea008堆 0x8048a57字符常量

转载于:https://www.cnblogs.com/jane-huang/archive/2010/01/17/1650057.html

你可能感兴趣的:(堆和栈地址——eclipse linux实践)