10th Elementary Concepts Of Objects And Classes-by Parvathy M

Approved & Edited by ProProfs Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Parvathy M
P
Parvathy M
Community Contributor
Quizzes Created: 1 | Total Attempts: 79
Questions: 7 | Attempts: 79

SettingsSettingsSettings
10th Elementary Concepts Of Objects And Classes-by Parvathy M - Quiz

Answer all the questions.


Questions and Answers
  • 1. 

    Define object with an example.

  • 2. 

    Why is class called as an object factory.

  • 3. 

    Class person{ name address Display( ) print ( ) } write down the data members  and member functions of class person.

  • 4. 

    Write a program by using a class 'school' without any data members but having only functions as per the specifications given below. schoolname: childrens Academy Place:kandivali void display1( ): To print schoolname and place.

  • 5. 

    What is a comment.Which are the two types of comment.

  • 6. 

    Class can have only one object.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    This statement is false because a class can have multiple objects. In object-oriented programming, a class is a blueprint for creating objects. Each object created from the class will have its own set of attributes and behaviors. Therefore, it is possible to create multiple objects from the same class, each with its own unique characteristics.

    Rate this question:

  • 7. 

    ________ is a user defined data type.

    Correct Answer
    class
    Explanation
    A class is a user-defined data type that allows the programmer to define their own data structure. It can contain both data members (variables) and member functions (methods) to operate on those data members. The class serves as a blueprint for creating objects, which are instances of the class. Objects can then be used to access the data and perform operations defined within the class.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 27, 2020
    Quiz Created by
    Parvathy M
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.