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 variable-scope
1
vote
2
answers
1
UGC NET CSE | June 2005 | Part 2 | Question: 11
After $3$ calls of the $c$ function bug ( ) below, the values of $i$ and $j$ will be : int j = 1; bug () { static int i = 0; int j = 0; i++; j++; return (i); } $i = 0, j = 0$ $i = 3, j = 3$ $i = 3, j = 0$ $i = 3, j = 1$
go_editor
asked
in
Programming in C
Mar 26, 2020
by
go_editor
1.5k
views
ugcnetcse-june2005-paper2
programming-in-c
variable-scope
1
vote
8
answers
2
UGC NET CSE | June 2005 | Part 2 | Question: 12
Find the output of the following $“C”$ code : Main() { int x=20, y=35; x=y++ + x++; y=++y + ++x; printf (“%d, %d\n”, x, y); } $55, 93$ $53, 97$ $56, 95$ $57, 94$
go_editor
asked
in
Programming in C
Mar 26, 2020
by
go_editor
2.3k
views
ugcnetcse-june2005-paper2
programming-in-c
variable-scope
3
votes
2
answers
3
UGC NET CSE | June 2005 | Part 2 | Question: 15
Main() { char *str="abcde"; printf("%c",*str); printf("%c",*str++); printf("%c",*(str++)); printf("%s",str); } The output of the above $‘C’$ code will be : $\text{a a c b c d e}$ $\text{a a c c c d e}$ $\text{a a b c d e}$ None of these
go_editor
asked
in
Programming in C
Mar 26, 2020
by
go_editor
1.1k
views
ugcnetcse-june2005-paper2
programming-in-c
variable-scope
0
votes
1
answer
4
global variable
is the global variable store in code section of the process?
Gurdeep Saini
asked
in
Operating System
Nov 3, 2018
by
Gurdeep Saini
430
views
variable-scope
1
vote
1
answer
5
Gateforum Test Series: Compiler Design - Variable Scope
Gupta731
asked
in
Compiler Design
Oct 19, 2018
by
Gupta731
529
views
compiler-design
gateforum-test-series
variable-scope
6
votes
2
answers
6
test series
extern int i; int i=5; i=10; int main() { printf("\ni=%d",i); return 0; } output is?
parulk
asked
in
Programming in C
Jan 11, 2018
by
parulk
1.2k
views
programming-in-c
extern
variable-scope
0
votes
2
answers
7
UGC NET CSE | December 2008 | Part 2 | Question: 25
Which one of the following describes correctly a static variable? It cannot be initialized It is initialized once at the commencement of execution and cannot be changed at run time It retains its value during the life of the program None of the above
rishu_darkshadow
asked
in
Programming in C
Sep 25, 2017
by
rishu_darkshadow
4.8k
views
ugcnetcse-dec2008-paper2
programming-in-c
variable-scope
0
votes
4
answers
8
programming Strings
For the following program: #include<stdio.h> char *getString() { char *str = "GfG"; return str; } int main() {getString(); printf("%s", str); // Gives error, but printf("%s", getString()); works perfect. return ... does not get destroyed, wh can't we print the value using str? Why does the program give error saying that str is undeclared?
Bongbirdie
asked
in
Programming in C
May 29, 2017
by
Bongbirdie
1.5k
views
programming-in-c
strings
variable-scope
0
votes
2
answers
9
Programming Scope of variables
The following program runs perfectly fine without showing compilation error. I am unable to understand why as 'c' is a local variable of 'function_addition'. So, shouldn't it throw an error? #include<stdio.h> int ... ambiguity as to why the first one prints the value of c correctly whereas the second program shows an error.
Bongbirdie
asked
in
Programming in C
May 28, 2017
by
Bongbirdie
974
views
programming-in-c
scoping-rule
variable-scope
16
votes
2
answers
10
GATE CSE 1987 | Question: 1-xx
For the program given below what will be printed by the write statements marked $(1)$ and $(2)$ in the program if the variables are dynamically scoped? Var x, y:interger; procedure P(n:interger); begin x := (n+2)/(n-3); end; procedure Q Var x, y:interger; begin x:=3; y:=4; P ... (1) end; begin x:=7; y:=8; Q; Write(x); __(2) end. $3, 6$ $6, 7$ $3, 7$ None of the above
makhdoom ghaya
asked
in
Compiler Design
Nov 8, 2016
by
makhdoom ghaya
3.4k
views
gate1987
compiler-design
variable-scope
runtime-environment
25
votes
2
answers
11
GATE CSE 1987 | Question: 1-xix
Study the following program written in a block-structured language: Var x, y:interger; procedure P(n:interger); begin x:=(n+2)/(n-3); end; procedure Q Var x, y:interger; begin x:=3; y:=4; P(y); Write(x) __(1) end; begin x:=7; y:=8; Q; Write(x); ... marked $(1)$ and $(2)$ in the program if the variables are statically scoped? $3, 6$ $6, 7$ $3, 7$ None of the above.
makhdoom ghaya
asked
in
Compiler Design
Nov 8, 2016
by
makhdoom ghaya
7.3k
views
gate1987
compiler-design
variable-scope
runtime-environment
2
votes
1
answer
12
Self Doubt
I came across few Compiler Design Doubts, Please provide your cent. $Q_1 :$ Can lexical analyser detect some/any type of errors? I think yes, because while scanning to identify tokens, it may be the cases that a string pattern doesn't match with any keyword (or) ... Left linear) $\color{navy}{A \rightarrow aA}$(Right Linear). What can be said about $\color{navy}{A \rightarrow aAb}$
mcjoshi
asked
in
Compiler Design
Nov 1, 2016
by
mcjoshi
1.1k
views
compiler-design
lexical-analysis
variable-scope
4
votes
2
answers
13
Scope
Dexter
asked
in
Compiler Design
Apr 12, 2016
by
Dexter
2.1k
views
programming-in-c
variable-scope
made-easy-booklet
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 variable-scope
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:...