closed by
653 views
1 votes
1 votes
closed as a duplicate of: made easy
can anyone explain by using static and dynamic programing ? what will be output for static and dynamic?

   #include<stdio.h>
int x=10;
void part1(int *a)
{
*a+=x++;
printf("%d",*a);
}
void part2(int *b)
{
static x=15;
*b=*b*x;
part1(&x);
printf("%d",x);
}
void main(){
part2(&x);
part1(&x);
}
closed by

1 Answer

Related questions

0 votes
0 votes
0 answers
1
saumya mishra asked Dec 16, 2017
900 views
Can anyone please explain what is the answer to this question by static and dynamic scoping?
7 votes
7 votes
3 answers
3
4 votes
4 votes
4 answers
4
Aspi R Osa asked Dec 10, 2015
1,813 views
Indicate results of the following program if the language usesi)Static scope rule andii) Dynamic scope rules (GATE-1989)var x,y:integer;procedure A(var z:integer);var x:i...