Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged 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)
admin
asked
in
Programming in C
Mar 31, 2020
by
admin
1.0k
views
nielit2016dec-scientistb-it
programming-in-c
dynamic-scoping
1
vote
1
answer
2
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$?
srestha
asked
in
Programming in C
Mar 23, 2019
by
srestha
451
views
programming-in-c
dynamic-scoping
parameter-passing
1
vote
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.
Ayush Upadhyaya
asked
in
Programming in C
Jan 3, 2019
by
Ayush Upadhyaya
2.1k
views
dynamic-scoping
programming
0
votes
1
answer
4
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?
kajivu
asked
in
Programming in C
Dec 20, 2018
by
kajivu
306
views
dynamic-scoping
programming-in-c
0
votes
2
answers
5
#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
Hradesh patel
asked
in
Programming in C
Jun 20, 2018
by
Hradesh patel
466
views
programming-in-c
static-scoping
dynamic-scoping
3
votes
1
answer
6
Dynamic Scoping
How to solve any dynamic scoping question . Plz describe in detail.
dragonball
asked
in
Compiler Design
Jan 14, 2018
by
dragonball
885
views
compiler-design
dynamic-scoping
1
vote
2
answers
7
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
Ron111
asked
in
Programming in C
Nov 30, 2017
by
Ron111
2.1k
views
programming-in-c
scoping-rule
dynamic-scoping
3
votes
2
answers
8
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?
set2018
asked
in
Programming in C
Oct 10, 2017
by
set2018
456
views
programming
dynamic-scoping
13
votes
1
answer
9
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); }
firki lama
asked
in
Programming in C
Jan 9, 2017
by
firki lama
4.0k
views
programming-in-c
static-scoping
dynamic-scoping
To see more, click for the
full list of questions
or
popular tags
.
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged dynamic-scoping
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...