博主头像
ThincHEr-L

有关C语言的注意事项

  1. 全局变量和静态变量在未初始化时,系统会自动赋初值为0。
  2. 局部变量在未初始化时,其值是未定义的,即随机值。
  3. 有关switch,如果没有 break 语句,程序将会继续执行下一个 case 标签中的代码,直到遇到 break 语句或 switch 语句结束。
  4. Code是存储程序代码的。

    RO-data是存储const常量和指令。

    RW-data是存储初始化值不为0的全局变量。

    ZI-data是存储未初始化的全局变量或初始化值为0的全 局变量。

    Flash=Code + RO Data + RW Data;

    RAM= RW-data+ZI-data;

仅有 1 条评论
  1. 评论头像

    Having read this I believed it was extremely informative.
    I appreciate you spending some time and energy to
    put this information together. I once again find myself spending a lot of time both reading and leaving comments.
    But so what, it was still worthwhile!

    Read more March 9th, 2025 at 08:45 pm 回复
发表新评论