From 045f50aa4650f66086815c99021e621fdc211e84 Mon Sep 17 00:00:00 2001 From: Ir1dXD Date: Sun, 25 Nov 2018 19:31:28 +0800 Subject: [PATCH] Update index.md --- docs/string/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/string/index.md b/docs/string/index.md index e01d40cb..61376efd 100644 --- a/docs/string/index.md +++ b/docs/string/index.md @@ -25,3 +25,9 @@ - 字符串字面量:它们的值在编译过程中已经确定,保存在可执行目标文件的 `.rodata` 段内。 调用 `objdump -s -j .rodata 文件名` 可以查看 `.rodata` 段的具体内容。 - 字符数组、`vector`、`string`:局部变量保存在栈中,全局变量若初始化了保存在可执行目标文件的 `.data` 段内,若未初始化保存在 `.bss` 段。 + ```c++ + char rank[233]; + // rank 在 .bss 段 + char buf[233] = {0}; + // buf 在 .data 段 + ``` -- 2.11.0