+1 vote
102 views
What is runtime enviornment (Is it do anything more than running the program?)?

Where Stack Pointer generally needed?Why it is needed runtime and not compile time? Has it any link with interrupts?
| 102 views
+1

Runtime environment means what is values of variable (static,local or global etc.) at that specific time.

At compile time you did not run the code, therefore stack pointer doesn't need at that time. (Stack means Stack Memory.)

let see the following code.

main()

{

.............

f1();

................

f2();

............

}

f1()

{

.......

f2()

.......

}

f2()

{

.......

}

lin this code execution starts at main, after some time it will goto f1(), Then how it would be comeback to main() again? due to use of stack pointers only.

0
but why "environment" term comes for runtime and not for compile time?
0
i hope, we can use the term with compile time also

i am not sure!
0
@srestha Run time environment is nothing but when we are supposed to run a programm then at that time what support our program is needed from operating system .

+1 vote