Related questions with answers
Question
________ variables are defined outside all functions and are accessible to any function within their scope.
Solution
VerifiedAnswered 1 year ago
Answered 1 year ago
Global
Let's define a global variable and access it in different functions,
// global variable
int global = 1;
// global variable can be
//accessed by any function
void print()
{
cout<<global;
}
// main function
int main()
{
// accessing the global variable
global = 10;
print();
}
Create a free account to view solutions
By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Create a free account to view solutions
By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Recommended textbook solutions

Starting Out with C++ from Control Structures to Objects
8th Edition•ISBN: 9780133769395 (7 more)Godfrey Muganda, Judy Walters, Tony Gaddis1,374 solutions

Fundamentals of Database Systems
7th Edition•ISBN: 9780133970777Ramez Elmasri, Shamkant B. Navathe961 solutions

Introduction to Algorithms
3rd Edition•ISBN: 9780262033848Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen872 solutions

Introduction to Algorithms
4th Edition•ISBN: 9780262046305Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen945 solutions
More related questions
- differential equations
- linear algebra
- linear algebra
1/4
- differential equations
- linear algebra
- linear algebra
1/7