Exercises


  1. In the following code, how would you refer to the name great from code in the namespace fabulous?

     namespace fabulous { // code in fabulous namespace } namespace super { namespace smashing { // great name defined } } 
  2. Which of the following is not a legal variable name?

    • myVariableIsGood

    • 99Flake

    • _floor

    • time2GetJiggyWidIt

    • wrox.com

  3. Is the string "supercalifragilisticexpialidocious" too big to fit in a string variable? Why?

  4. By considering operator precedence, list the steps involved in the computation of the following expression:

     resultVar += var1 * var2 + var3 % var4 / var5; 
  5. Write a console application that obtains four int values from the user and displays the product. Hint: you may recall that the Convert.ToDouble() command was used to covert the input from the console to a double; the equivalent command to convert from a string to an int is Convert.ToInt32().




Beginning Visual C# 2005
Beginning Visual C#supAND#174;/sup 2005
ISBN: B000N7ETVG
EAN: N/A
Year: 2005
Pages: 278

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net