Question: 1) Using the following Write( ) method, show what will be displayed? Write({0,-2:f0}-{1,6:c}, 1, 3 * 2 ); ________________ 2) Using the following method headings:
1) Using the following Write( ) method, show what will be displayed? Write({0,-2:f0}-{1,6:c}, 1, 3 * 2 ); ________________ 2) Using the following method headings: Method1: static int DetermineResult(int value1, double value2) Method2: static void DisplayResult(int value1, double value2) Method1: static int GetValue( ) Which of the preceding method(s) will not have a return statement as part of its body? ____________. 3) Which operation would be performed first given the following assignment statement ans = value1 + value2 * value3 (value4 + 20 / 5 % 2) * 7; _________________ 4) Using the following Write( ) method, show what will be displayed? Write(Number {0:f0} is {1:c}, 1, 3); _________________ 5) The Math class has a number of static methods, including Sqrt( ) which returns the square root of a value. Intellisense shows its signature like this: double Math.Sqrt(double d) Assuming you had variables answer and value1 of double type, which had 0 and 25 stored in their cells respectively (answer holds 0, value1 holds 25), how would you invoke the Sqrt( ) method to store the square root of value1 in answer? 6) The Math class has a number of static methods, including Sqrt( ) which returns the square root of a value. Intellisense shows its signature like this: double Math.Sqrt(double d) Assuming you had variables answer and value1 of double type, which had 0 and 25 stored in their cells respectively (answer holds 0, value1 holds 25), how would you invoke the Sqrt( ) method to store the square root of value1 in answer? 8) Using the following method headings: Method1: static int DetermineResult(int value1, double value2) Method2: static void DisplayResult(int value1, double value2) Method1: static int GetValue( ) How many parameters does each method have? Method1 has Blank 1 parameters; Method2 has Blank 2 parameters; Method3 has Blank 3 parameters. 9) Suppose y, and z are int variables and y = 6, and z = 10. What will be in the memory locations of each of the variables after the following statement is executed? z += ++y % 2; 10) Using the following method headings: Method1: static int DetermineResult(int value1, double value2) Method2: static void DisplayResult(int value1, double value2) Method1: static int GetValue( ) What is the return type for each of the methods?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
