Computer Programming Basic Functions! Hardest Trivia Quiz

14 Questions | Total Attempts: 147

SettingsSettingsSettings
Please wait...
Computer Programming Basic Functions! Hardest Trivia Quiz

There are various computer programming basic functions that an aspiring programmer is expected to be conversant with. The quiz below is designed to see how conversant you are with some of the basics covered in class. Do give it a try and get to find out if you need to add more study sessions to your program. All the best!


Questions and Answers
  • 1. 
    What is a class?
    • A. 

      Gets information about the objects properties

    • B. 

      Category of objects that are related

    • C. 

      Tells about the object

    • D. 

      Are public

  • 2. 
    Class properties tell about the object, and are called Instance Variables. They can be used within the class methods, and therefore are private. They cannot be changed in the code, so you have to use methods. True or False.
    • A. 

      True

    • B. 

      False

  • 3. 
    What is the method signature?
    • A. 

      Title of the method

    • B. 

      Option of the method

    • C. 

      Header of the method

    • D. 

      All of the above

  • 4. 
    The parameters define the values that you wish to pass to the method. True or False.
    • A. 

      False

    • B. 

      True

  • 5. 
    ________ is the value send to the method. The method can manipulate that value however the value stays in the method, and cannot be passed back.
  • 6. 
    _________: the value is sent to the method, the method can then manipulate and send that value back. 
  • 7. 
    What is a constructor?
    • A. 

      Class method that is executed when an object of a given type is created.

    • B. 

      Constructor that has parameters.

    • C. 

      Method name with its parameter list

    • D. 

      All of the above

  • 8. 
    Default Constructors are constructors with no parameters. True or False.
    • A. 

      True

    • B. 

      False

  • 9. 
    Parameterized constructors are constructors that have parameters. True or False.
    • A. 

      True

    • B. 

      False

  • 10. 
    A _________ is a method name name with its parameter list.
  • 11. 
    Is this an example of a switch statement? switch(intGrades)           {               case 10: case 9:                    strGrade="A";                       break;               case 8:                   strGrade="B";                   break;               case 7:                   strGrade = "C";                   break;               case 6:                   strGrade="D";                       break;               case 5: case 4: case 3: case 2: case 1:                       strGrade = "F";                       break;                 }        
    • A. 

      True

    • B. 

      False

  • 12. 
    What is a Ternary Operator?
    • A. 

      Shortcut for boolean statements, it is !=

    • B. 

      Shortcut for if statements, it is a question mark.

    • C. 

      Shortcut for if statements, it is a !

    • D. 

      Shortcut for expressions, it is an =