Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Search results for dynamic-scoping
2
votes
4
answers
1
NIELIT 2016 DEC Scientist B (IT) - Section B: 60
How will you free the allocated memory? remove(var-name) free(var-name) delete(var-name) dalloc(var-name)
How will you free the allocated memory?remove(var-name)free(var-name)delete(var-name)dalloc(var-name)
admin
989
views
admin
asked
Mar 31, 2020
Programming in C
nielit2016dec-scientistb-it
programming-in-c
dynamic-scoping
+
–
3
votes
1
answer
2
Dynamic Scoping
How to solve any dynamic scoping question . Plz describe in detail.
How to solve any dynamic scoping question . Plz describe in detail.
dragonball
879
views
dragonball
asked
Jan 14, 2018
Compiler Design
compiler-design
dynamic-scoping
+
–
1
votes
2
answers
3
Output Under Dynamic Scoping
#include<stdio.h> int x=10; int main() { static int x=10; x+=f1()+f2()+f3()+f1(); printf("%d",x); return 0; } int f1(){static int x=25;x++;return x;} int f2(){int x=50;x++;return x;} int f3(){x*=10;return x;} What is the output of the above code, if dynamic scoping is used.
#include<stdio.h int x=10; int main() { static int x=10; x+=f1()+f2()+f3()+f1(); printf("%d",x); return 0; } int f1(){static int x=25;x++;return x;} int f2(){int x=50;x++...
Ayush Upadhyaya
2.0k
views
Ayush Upadhyaya
asked
Jan 3, 2019
Programming in C
dynamic-scoping
programming
+
–
1
votes
1
answer
4
Self Doubt on scoping
int x = 5, y = 10 ; void main ( ) { int i = 2, j = 3 A (i, j); } void A (int i, int j) { int x = 10, y = 5 ; i = i + x : j = i + y : printf ("%d %d", i, j); B (i, j); } void B (int i, int j) { i ... by-name 3. call-by-need 4. call-by-value 5.Static scoping 6.Dynamic scoping Any reference for call by name and call by need Is for static coping $12,17,54$ or $12,17,59$?
int x = 5, y = 10 ; void main ( ) { int i = 2, j = 3 A (i, j); } void A (int i, int j) { int x = 10, y = 5 ; i = i + x : j = i + y : printf ("%d %d", i, j); B (i, j); } v...
srestha
437
views
srestha
asked
Mar 23, 2019
Programming in C
programming-in-c
dynamic-scoping
parameter-passing
+
–
0
votes
1
answer
5
Behaviour of dynamically scoped variables after returning from a function
Are any modifications to the value of a dynamically scoped variable persistent even after the function (in which modifications were made) returns? For example, in the following code (assuming dynamic ... of current function? Do dynamically scoped variables essentially act like global variables in this particular regard?
Are any modifications to the value of a dynamically scoped variable persistent even after the function (in which modifications were made) returns? For example, in the fol...
kajivu
291
views
kajivu
asked
Dec 20, 2018
Programming in C
dynamic-scoping
programming-in-c
+
–
1
votes
2
answers
6
Dynamic Scope
What is the output of the following program if dynamic scoping is used? int a,b,c; void func1() { int a,b; a=6; b=8; func2(); a=a+b+c; print(a); } void func2(){ int b,c; b=4; c=a+b; a+=11; // here in case of dynamic scoping will //variable a of func1() be updated to a=6+11 ? print(c); } void main(){ a=3; b=5; c=7; func1(); } 7 19 10 1 10 23 10 32
What is the output of the following program if dynamic scoping is used? int a,b,c; void func1() { int a,b; a=6; b=8; func2(); a=a+b+c; print(a); } void func2(){ int b,c; ...
Ron111
2.0k
views
Ron111
asked
Nov 30, 2017
Programming in C
programming-in-c
scoping-rule
dynamic-scoping
+
–
0
votes
2
answers
7
#self
Q. int k; fun(int i) { k = i + 3; printf(k); } gun( int i) { int k = 4; k = i+4; fun(k); printf(k); } main(){ k=2 ; gun(k); printf(k); } my result static scoping - 9,6,2 ( here last print statement i have doubt ..it will print 2 or 9) dynamic scoping- 9,9,2
Q. int k; fun(int i) { k = i + 3; printf(k); } gun( int i) { int k = 4; k = i+4; fun(k); printf(k); } main(){ k=2 ; gun(k); printf(k); }my resultstatic scoping - 9,6...
Hradesh patel
453
views
Hradesh patel
asked
Jun 20, 2018
Programming in C
programming-in-c
static-scoping
dynamic-scoping
+
–
13
votes
1
answer
8
static and dynamic scoping
int a=0,b=0; int main(void) { int a=3; printf("%d%d",a,b); c(); printf("%d%d",a,b); return 0; } void c() { printf("%d%d",a,b); a=4,b=5; printf("%d%d",a,b); d(); printf("%d%d",a,b); } void d() { int b=6; e(a,b); printf("%d%d",a,b); } void e(int b,int a) { printf(a,b); a=7;b=8; printf("%d%d",a,b); }
int a=0,b=0; int main(void) { int a=3; printf("%d%d",a,b); c(); printf("%d%d",a,b); return 0; } void c() { printf("%d%d",a,b); a=4,b=5; printf("%d%d",a,b); d(); printf("%...
firki lama
3.9k
views
firki lama
asked
Jan 9, 2017
Programming in C
programming-in-c
static-scoping
dynamic-scoping
+
–
3
votes
2
answers
9
dynamic scoping
int i=10; main() { int i =5,k,i=6; printf("enter value"); scanf("%d",&k); if(k>0) { fun1(); } else { fun2(); } } void fun1(); { printf("%d",i); } void fun2(); { int i=5; printf("%d",i); fun1(); } what will the output using dynamic scoping?
int i=10;main(){int i =5,k,i=6;printf("enter value");scanf("%d",&k);if(k>0){fun1();}else{fun2();}}void fun1();{printf("%d",i);}void fun2();{int i=5;printf("%d",i);fun1();...
set2018
445
views
set2018
asked
Oct 10, 2017
Programming in C
programming
dynamic-scoping
+
–
To see more, click for the
full list of questions
or
popular tags
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register