What will be the output of the following program using call by reference and dynamic scope respectively?
int n;
void a(int x){
x++;
printf(“%d\t”,x); }
void b(int n){
n = 10; a(n);
}
main(){
int n = 2;
a(n);
b(n); }1
3 4
2
2 3
3
3 11
4
2 11