0

Variable is stored in RAM or What?

 1 year ago
source link: https://aungkoman.github.io/youdontkonw/2023/05/13/varaible-in-depth.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Variable is stored in RAM or What? – – Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.

Variable is stored in RAM or What?

ပရိုဂရမ်မာတွေ အမြဲတမ်းလိုလို ထိတွေ့နေရတဲ့ ကုတ်တွေထဲမှာ variable ဆိုတာမပါမဖြစ်ပါ။

နေ့စဉ်နေ့တိုင်း variable တွေတော့ သုံးနေကြတာပဲ။​ ဒါပေမယ့် ခနလေး ရပ်ပြီး စဉ်းစားလိုက်ကြရအောင်။ variable တစ်ခု ကြေညာပြီး အဲ့ variable ထဲမှာ data တစ်ခုခု Store လုပ်လို့ရတာတော့ ဟုတ်ပါပြီ၊ အဲ့ Store လုပ်ထားတဲ့ Data ကို ဘယ်မှာ သိမ်းထားကြတာလဲ?

ကျွန်တော် တို့ ကွန်ပျူတာကို ကြည့်လိုက်ရင် သိမ်းစရာ အဓိက (၂)​ နေရာ တွေ့ရမယ်။​ RAM နဲ့ Harddisk ( may be SSD )

ဒီတော့ ကျွန်တော်တို့ ကြေညာပြီးသိမ်းလိုက်တဲ့ Variable တွေက RAM မှာ သိမ်းလိုက်တာလား?​ Harddisk မှာ သိမ်းလိုက်တာလား?

Which memory stores the values of variables?

RAM memory stores the values of variables .

Random Access Memory is where the computer stores temporary data during program execution. Integers require 2-bytes or 16 bits of storage each. … These numbers are known as memory addresses. A variable reserves one or more addresses in which a binary value is stored.

Variables are usually stored in RAM. This is either on the heap (e.g. all global variables will usually go there) or on the stack (all variables declared within a method/function usually go there). Stack and Heap are both RAM, just different locations. Pointers have different rules.

Written on May 13, 2023

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK