How are treated constants in various languages/compilers? They take up space in RAM in runtime or are replaced with their values at compile time?
How are treated constants in various languages/compilers? They take up space in RAM in
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A compiler is free to go either way. The typical way to handle this is to use scalars directly while keeping larger objects like arrays in memory.
In addition, if you build an embedded system, they typically go into read-only memory like flash rather than RAM.