The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 409 Weeks Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
1. The function traceMe in Exercise 12 outputs the values of x, y, and z. Modify the definition of this function so that rather than print these values, it sends the values back to the calling environment and the calling environment prints these values.
2. Determine the scope of each identifier.
3. What is the output of the following code fragment? (Note: alpha and beta
are int variables.)
alpha = 5;
beta = 10;
if (beta >= 10)
{
int alpha = 10;
beta = beta + alpha;
cout << alpha << " " << beta << endl;
}
cout << alpha << " " << beta << endl;
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on-----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be-----------