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: | Jul 2017 |
| Last Sign in: | 314 Weeks Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
(TCO 2) When a program evaluates mathematical expressions, which of the following operators (or mathematical operations) has the highest precedence?
(Points : 5)
      Subtraction
      Addition
      Parentheses
      All have equal precedence.
Â
(TCOs 2, 7) Which one of the following is not a valid assignment statement in a program?
(Points : 5)
      b = -b
      x – 6 = a
      a = a + 1
      None of the above
Â
(TCO 2) Which value will be contained in the variable x after the following statement is executed?
x = 20 – 10 * 2 / (5 – 1)
(Points : 5)
      0
      10
      5
      15
Â
If you use a loop to sum up a number of test scores, you will need a variable to act as a(n) _____.
(Points : 5)
      flag
      symbol
      counter
      accumulator
(TCO 4) For maximum efficiency, which question should be asked first when working with an Or decision?
(Points : 5)
      The one less likely to be true
      The one most likely to be true
      The one that involves fewer comparisons
      There is not enough information to determine the answer.
Â
(TCOs 3, 4, and 8) In the following pseudocode, which raise will an employee in Department 6 receive?
Â
         If department < 2 then
                Set raise = 1000
         Else
                If department < 6 then
                       Set raise = 2500
                Else
                       Set raise = 3000
                EndIf
         EndIf
(Points : 5)
      1,000
      2,500
      3,000
      0
Â
(TCOs 3 and 4) Which of the selection structures determine whether the user enters a number within a range of 5 and 15?
Â
(Points : 5)
      If commission <> 15
      If commission <= 15
      If (commission < 5) || (commission >15)
      If (commission >=5) && (commission <= 15)
Â
Â
Question 4.4. (TCOs 3, 4, and 8) Which value gets displayed for the variable Z?
Â
         Set balance = 800
         Set stateCode = 8
         Set creditCode = 9
          If (balance <> 800) AND (stateCode <> 6) AND (creditCode <> 7) then
                Set Z = 3
         Else
                Set Z = 2
         EndIf
         Display Z
(Points : 5)
      6
      2
      3
      7
Â
Â
Â
Â
Question 5.5. (TCO 5) Whether or not the loop body is executed is controlled by a(n) _____.
(Points : 5)
      Boolean expression
      arithmetic expression
      loop iteration
      assignment statement
Â
Â
Question 6.6. (TCO 5) Which loop must execute the body of the loop at least once?
(Points : 5)
      A pretest loop
      A post-test loop
      A sequence structure
      A selection structure
Â
Â
Question 7.7. (TCO 5) In the following code, how many times will the loop body be executed?
Â
int num;
for (num = 10; num <= 20;num+=5)
{
Console.WriteLine(num);
}
Â
(Points : 5)
      0
      3
      4
      6
Â
Â
Â
Â
Question 8.8. (TCOs 3, 5, and 8) In the following code, how many times will the loop body be executed?
Â
int x=6;
while(x<=6)
{
Console.WriteLine(x);
x = x + 1;
}
(Points : 5)
      0
      1
      6
      7
Â
Â
Â
Â
Question 9.9. (TCO 6) Which is an array element?
(Points : 5)
      A specific value in an array
      An alternate name for an array
      A number that indicates the position of a particular item within an array
      A number that represents the highest value stored within an array
Â
Â
Â
Question 10.10. (TCO 6) Which is the value of the index used to access the first element in a C# array declared as the following?
int[] num = new int[20];
(Points : 5)
      20
      9
      1
      0
Â
Â
Â
Â
Question 11.11. (TCOs 5 and 6) Which control structure can be used to process every element of an array?
Â
(Points : 5)
      Selection control structure
      While loop
      For loop
      B or C
Â
Â
Question 12.12. (TCO 6) A zero-based array named sales has been declared and loaded with the values 100, 1100, 3400, 5550, 3000, 22300, and 1200. Which value(s) will be stored in the array element sales[0]?
(Points : 5)
      100
      1100
      3400
      100, 1100
Â
Â
Question 13.13. (TCOs 7 and 8) Which type of error occurs when an array subscript’s value goes beyond the total number of elements in the array?
(Points : 5)
      Syntax error
      Runtime error
      Logic error
      Out-of-bounds error
Â
Â
Question 14.14. (TCOs 3 and 8) Which of the following is not an advantage of modular design?
(Points : 5)
      It increases complexity.
      Modules can be reused.
      It is easier to work in teams — different people completing different modules.
      All of the above are advantages.
Attachments:
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly