Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 12 Weeks 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. |