Computer Sciences > Gate 2016 Set-1 > C code
What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed?
a=3;
void n(x) {x = x * a; print(x);}
void m(y) {a = 1; a = y - a; n(a); print(a);}
void main() {m(a);}
void n(x) {x = x * a; print(x);}
void m(y) {a = 1; a = y - a; n(a); print(a);}
void main() {m(a);}
Correct : C code
Similar Questions
What will be the output of the following C program?
void count(int n)
{
static int d = 1;
printf("%d ", n);
pri...
What will be the output of the following C program?
void count(int n)
{
static int d = 1;
printf("%d ", n);
pri...
What will be the output of the following C program?
void count(int n)
{
static int d = 1;
printf("%d ", n);
pri...
Total Unique Visitors
Loading......