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: | Apr 2017 |
| Last Sign in: | 137 Weeks Ago, 2 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
can any answer these question ASAP?
1. (TCO 3) Given the following code and flag = 2, what is the value of x after the code executes?
int x = 0;
switch (flag)
{
case 0:
x++;
break;
case 1:
case 2:
x++;
case 3:
x++;
break;
case 4:
x++;
case 5:
case 6:
x++;
case 7:
x++;
break;
default:
break;
}(Points : 5) x
will be 0.
x
will be 1.
x
will be 2.
x
will be 3.
myFile.create("file.txt"); ifstream myFile; myFile.create(); |
200 400 8 |
int myFunc(int x) { return 2*x; } y = myFunc(3); int myFunc(int){} |
40 20 10 |
It gives access to a user-created header file. This is required to do file IO. All of the above |
0 8 4 |
If flag1 is not equal to flag2, 4 is stored in X. X, flag1, and flag2 are set to 4:20. If flag1 equals flag2, 4 is stored in X. |