Programming Language GATE-2012 Problem Solution

preview_player
Показать описание
Consider the following C code segment.
int a, b, c = 0;
void prtFun(void);
main()
{
static int a = 1; /* Line 1 */
prtFun();
a += 1;
prtFun();
printf(“ \n %d %d ”, a, b);
}
void prtFun(void)
{
static int a = 2; /* Line 2 */
int b = 1;
a += ++b;
printf(“ \n %d %d ”, a, b);
}
What output will be generated by the given code segment if:
Line 1 is replaced by auto int a=1;
Line 2 is replaced by register int a=2;
GATE CSE 2012 Question: 49

Auto Variables in C
Variable in C programming in hindi | what is variable? Types of Variables in c in hindi
Variables & Data Types In C
Variables in C Programming | Programming in C
Introduction to Variables in C
Variables in C | C Language Tutorial
Recursion in C
Recursion in C | Introduction to Recursion
Recursive Functions: Recursion In C
Recursion in C | Recursive function in c programming
GATE CSE Preparation Strategy | Computer Science Preparation Strategy
How to Prepare for GATE CSE
GATE CSE Videos | GATE CSE PYQs Solution
GATE CSE Tips and Tricks
How I cracked GATE exam | Preparation strategy for GATE exam
How to Crack GATE Exam in First Attempt
How to Prepare For GATE Without Coaching
How to Crack GATE Exam Without Coaching
GATE Exam Preparation Strategy
How to Crack GATE by Self Study
Improve Score in GATE | Crack GATE Tricks
Benefits of GATE EXAM | How to PREPARE WITH or WITHOUT Coaching

#computerscience #computerscienceengineering #computersciencemcqs #computersciencevideos #gate #gateexam #gatecse #gatecomputerscience #gatecs #gatecsit #gate2012 #gate2023 #gate2023classes #gate2023preparation #gatepyqs #gatepyq #gatetips #gatetricks #gatepreparation #gateprepdaily #gatepreparationstrategy #gatepreviousyearquestions #gateprevioussolvedquestions #gatestrategy #gateexamprep #crackgateexam #crackgate #btech #btechcse #btechit #bca #mca #kshitijsahu #gateq #datastructure #datastructures #datastructureandalgorithm #datastructuresandalgorithms #datastructureandalgorithms #algorithm #algorithms #designandanalysisofalgorithms #programming #programminglanguage #programminginhindi #programmer #clanguage #clanguageprogramming #programminglanguages #programminglanguages2020 #programminglanguages2021 #recursion #functioninc #staticvariable #variable #variables
Рекомендации по теме
join shbcf.ru