I am perpetually confused when it comes to static scoping and dynamic scoping and their differences and Wikipedia isn't of any help, so here's my question:Given the following pseudo code in a hypothetical programming environment, what are the outputs under the following conditions?call by need using static scopecall by name using dynamic scopeglobal int n = 100, m = 5;void fun(x){    int n = 10;    print(x + 10);    n = 200;    m = 20;    print(x);}main(){    fun(n + m);}Additionally, what would be two environments where I can run this code to check the output with the conditions? C uses lexical scope, but it does not support call by need while Bash supports dynamic scope, I guess!
Static scope and dynamic scope
programming languages;semantics;variable binding