Intro to C# Programming

  1. What is a representation of the logical steps of a program drawn as a picture called?




    C. Flowchart
  2. What is the name of the language composed of zeros and ones that the computer can understand?




    D. Machine language
  3. What do you call a series of logical steps to be taken in order to accomplish any task?




    A. Algorithm
  4. What is the name of the language that allows programmers to use mnemonics to write computer instructions?




    D. Assembly language
  5. What kind of programming languages focus on how to accomplish a task?




    C. Procedure-oriented languages
  6. Assume that you successfully compiled the source code file named MyCode.cs. What would you type at the command prompt to run the executable program?




    C. MyCode.exe
  7. Which set of characters do you use to enclose a method or class body?




    B. Curly braces {}
  8. Which of the following follows the Best Practice used for the file extension of C# source code files?




    B. .cs
  9. Every C# program must have a method named what?




    C. Main()
  10. If your source code file defines a class called MyClass, then C# best practices recommends which of the following names is appropriate for the file?




    C. MyClass.cs
  11. Which of the following statements declares a variable named 'first', that can store a number that can have a decimal point?




    D. double first;
  12. What is the output from the following line of code? System.Console.Out.WriteLine(10 % 3);




    A. 1
  13. Which of the following lines of code will correctly attempt to convert a String variable named 'shoeSize' to a double, and store that value in a variable named 'dblShoeSize'?




    B. dblShoeSize=System.Convert.ToDouble(shoeSize);
  14. If you had two variable declared as int num1 = 3 and int num2 = 4, which of the following statements would display 334?




    C. System.Console.OutWriteLine("{0}{0}{1}", num1, num2);
  15. Assume that you have an int variable named 'items' that is storing the value 3. What is the output from the following line of code? System.Console.Out.WriteLine(items + "items");




    B. 3 items
  16. What is the output from the following line of code? System.Console.WriteLine(Math.Pow(3, 2));




    C. 9
  17. Which of the following lines of code will call on a method named 'MyMethod' that takes one integer and returns a double? The code should store the return value in a variable named 'dblTotal.'




    D. double dblTotal = MyMethod(4);
  18. Every C# method ends with which of the following?




    D. }
  19. Which of the following has access to the memory location of a variable that is declared in the Main method?




    B. Only the Main method
  20. What is the maximum number of methods a class can contain?




    A. As many as the programmer wants
Author
jdavis123
ID
355738
Card Set
Intro to C# Programming
Description
Lesson 1 - 4
Updated