C# Lesson 1- Quiz

5 Questions | Total Attempts: 48

SettingsSettingsSettings
Please wait...
Lesson Quizzes & Trivia

This is the Lesson 1 Quiz. Each question is worth 5 points. Your final score will reflect the percentage of total points that you earned. Please consider re-assessing this lessons if you score less than 70%.


Questions and Answers
  • 1. 
    The C# source code that is compiled into a program is written in “clear text”. Which of the following programs cannot create C# source code?
    • A. 

      'Office' software like Microsoft's Word or The Document Foundation's LibreOffice

    • B. 

      Plain text editors like Scite or Notepad

    • C. 

      Terminal emulators like Microsoft's CMD.exe or a Linux shell

  • 2. 
    The first part of a C# program to execute is named:
    • A. 

      Class

    • B. 

      BEGIN

    • C. 

      Main

    • D. 

      HELLO WORLD

  • 3. 
    The 'namespaces' in a C# program are mostly used to:
    • A. 

      Show which programmers programmed different code

    • B. 

      Change the order that the program is run in

    • C. 

      Prevent different variable names from being confused by the programmer

    • D. 

      Prevent different variable names from being confused by the compiler

  • 4. 
    The C# langauge teats which of the following as comments?
    • A. 

      Lines that begin with '#'

    • B. 

      Lines that begin with //

    • C. 

      Any text surrounded by '{' and '}'

    • D. 

      Any text that is capitalized

  • 5. 
    In C#, the programmer passes values into a function by:
    • A. 

      Writing the name of the data to the left of a function name: variable function

    • B. 

      Writing the name of the data to the right of the a function name: function() variable

    • C. 

      Writing the name of the data in the parentheses immediately after the function name: function(variable)

    • D. 

      By writing the value of the variable in the parentheses immediately following the function name: function(1)

Back to Top Back to top