+ 21
If variable values and references are stored in stack and heap memory where are variable names stored in a program?
Also where are class/template definitions stored? Data storage memory? Are these locations different between compiled and interpreted languages?
9 odpowiedzi
+ 14
Jay Matthews does that also apply to class definitions?
+ 14
Also do interpreted languages use stack and heap memory similar to compiled languages?
+ 6
Though this isn't like using a GUI, here's one way to poke around yourself using gdb (the GNU debugger)...
Compiling this program:
#include <stdio.h>
int SoloLearn = 42;
int main() { printf("%d", SoloLearn); return 0; }
Compile and separate debug symbols:
$ gcc -g -o solotest solotest.c
$ objcopy --only-keep-debug solotest solotest.debug
Start looking around...
$ gdb
(gdb) file solotest
Reading symbols from solotest...done.
(gdb) info variables
All defined variables:
File solotest.c
int SoloLearn;
(gdb) info addr SoloLearn
Symbol "SoloLearn" is static storage at address 0x11028
(gdb) info symbol 0x11028
SoloLearn in section .data
+ 6
variable name is not stored anywhere...it is just for
for ease of programmer and for good readability of the code...when the code is converted into machine language, there is no variable name left in the code...
+ 5
I don't know but the question begs clarification. Why is it being asked? Anyone who worked with low-level language will think twice before responding.
+ 5
With high-level languages, interpreters take care of all of that. During execution of the compiled programs, it's the operating system.
+ 3
Any 'low-level language' programmer understand that tags, such as variable and function labels are only the high level layer of the code. Once it's interpreted or compiled, it's all 0 or 1. It's all up to the operating system (linux, Microsoft, Android or Ios) to work on it
+ 1
how can I apply and do projects by html ,CSS and js ?
0
bad work