From 2d2aaa903b4cbdd5ff46c072202f14b3aa7b91a0 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Fri, 24 Jan 2025 13:46:36 -0500 Subject: [PATCH] adding global variables --- lectures/06_memory/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/06_memory/README.md b/lectures/06_memory/README.md index 93d4062..32f22ea 100644 --- a/lectures/06_memory/README.md +++ b/lectures/06_memory/README.md @@ -35,7 +35,7 @@ void func() { } ``` -- Static memory: variables allocated statically (with the keyword static), located at the data segment of the program's memory. They are are not eliminated when they go out of scope. They retain their values throughout the entire program execution, but are only accessible within the scope where they are defined. For example: +- Static memory: include global variables and variables declared with the static keyword, located at the data segment of the program's memory. They are are not eliminated when they go out of scope. They retain their values throughout the entire program execution, but are only accessible within the scope where they are defined. For example: ```cpp static int counter;