answersLogoWhite

0

// Global Reach

// Demonstrates global variables

#include

<iostream>

using

namespace std;

int

glob = 10; // global variable

void

access_global();

void

hide_global();

void

change_global();

int

main()

{

cout <<

"In main() glob is: " << glob << "\n\n";

access_global();

hide_global();

cout <<

"In main() glob is: " << glob << "\n\n";

change_global();

cout <<

"In main() glob is: " << glob << "\n\n";

return 0;

}

void

access_global()

{

cout <<

"In access_global() glob is: " << glob << "\n\n";

}

void

hide_global()

{

int glob = 0; // hide global variable glob

cout <<

"In hide_global() glob is: " << glob << "\n\n";

}

void

change_global()

{

glob = -10;

// change global variable glob

cout <<

"In change_global() glob is: " << glob << "\n\n";

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about American Government

Advantanges that the American had during war?

The advantages include: the British were fighting far from home thus orders and supplies usually took long to reach the favoring the Americans. Americans had a grand cause: fighting for their rights, their independence and their liberty. The war was expensive for the British, and finally the alliance with the French gave Americans courage and a tangible.


How many Americans are on welfare?

Welfare is a broad term that can refer to food stamps, TANF (temporary assistance for needy families) checks, Social Security benefits and even Medicaid/Medicare. According to the US Census Bureau, about 49% of Americans receive some type of financial support from the government as of 2011. But this includes Social Security and Medicare, which is supported by payroll taxes. As of 2011, more than 44.7 million Americans received food stamps. Roughly 4 million Americans receive TANF-funded assistance.


Did Americans in the mid 1800s think the benefits of growth outweighed its costs?

In the mid-1800s, many Americans believed the benefits of growth, such as economic opportunity, westward expansion, and technological advancements, outweighed the costs. This optimism was fueled by the idea of Manifest Destiny, which promoted the belief that the nation was destined to expand across the continent. However, this perspective often overlooked the negative consequences, including the displacement of Indigenous peoples, environmental degradation, and social inequalities. Overall, while growth was celebrated, its costs were frequently minimized or ignored by many at the time.


What does it mean to live in a global village?

Global village, is the term used to describe the world shrunk into a village by the means of the different media types, most especially the World Wide Web, making it easy to pass across messages (like the news), thereby making the world become like a single village where people can easily contact each other quicker.


Do haitians like Americans?

yes, they like americans but not like americans