This Quiz Contains 10 Questions From C++ Chapter 3

10 Questions | Total Attempts: 152

SettingsSettingsSettings
C Programming Quizzes & Trivia

C++ supports the four primary features of OOP, which means it supports deterministic destructors for classes unlike other OOP languages. The quiz below contains 10 questions from C++ chapter 3. Give it a shot and see how informed you are about the program and learn more. All the best and read up!


Questions and Answers
  • 1. 
    Can you use the += operator to concatenate strings?
    • A. 

      Yes

    • B. 

      No

  • 2. 
    You can access a string or an array element by providing an index number inside a what?
    • A. 

      Curly braces

    • B. 

      Subscripting operator

    • C. 

      Parenthesis

    • D. 

      Quotes

  • 3. 
    Objects are entities that combine data and functions.example:  ship.energyexample: ship.fireWeapons() A data element of an object is called what?
  • 4. 
    Objects are entities that combine data and functions.example:  ship.energyexample: ship.fireWeapons() A function of an object is called what?
  • 5. 
    Arrays provide a way to store and access sequences of any type.
    • A. 

      True

    • B. 

      False

  • 6. 
    Bounds checking is done when you compile a program.
    • A. 

      True

    • B. 

      False

  • 7. 
    for loops are often used for counting or looping through a sequence.
    • A. 

      True

    • B. 

      False

  • 8. 
    The empty() member function returns a true value if the string object is empty and false otherwise.example:  spaceship.empty()
    • A. 

      True

    • B. 

      False

  • 9. 
    You can use the break; and continue; commands in a for loop.
    • A. 

      True

    • B. 

      False

  • 10. 
    To get the number of characters in a string, you could use the ________ function or the ________ function.
Back to Top Back to top