1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
geniusboy [140]
3 years ago
9

Define Class in C++. Briefly discuss.

Computers and Technology
1 answer:
lesya [120]3 years ago
3 0

Answer:

Class are the collection of variable and member function.

Class are the blueprint of an object.

Explanation:

Following are the points regarding class in c++

1.In C++ class is an user defined datatype..

2.Classes are the collection of variable and function in c++.

3.To access the property of class we can create object of that class

4.We can use following syntax to declared any class in c++

class classname

{

accessmodifier:

//statement and function

};

main()

{

classname objectname;

}

implementation of class in c++

#include<iostream>

class test // class declaration

{

public: // access modifier

void fun3() // Method definition

{

cout<<" hello :";

}

};

void main() // main function

{

test ob;// creating object

ob.fun3(); // calling function

}

In this program we declared a class "test " in class test. We giving public access modifier .The public access modifier define that variable and function are accessible outside the class and in main method we create the object ob which call the function fun3().

Output:hello :

You might be interested in
Point: A Point in a two dimensional plane has an integer x coordinate value and an integer y coordinate value.
UNO [17]

Answer:

They are connected

Explanation:

8 0
3 years ago
Emily is an aspiring lyricist. She wants to make a demo tape to send to recording companies. Which input device can she use to r
satela [25.4K]
She would use a microphone. A joystick and mouse are two answers we could eliminate immediately. Seeing as she is an aspiring lyricist means she is in the music industry, so she wold need to use a microphone to be able to record.  
6 0
3 years ago
When you open a program, the hard drive___
Papessa [141]

Answer:

When you open a program, the hard drive <u>Registers the program and runs the program accordingly. </u>

I hope this helped!

3 0
3 years ago
In which of the following situations may you pass on the right
Natasha2012 [34]
In driving your vehicle, it is best to pass on the right after you slow your vehicle down and check for the road whether there is an upcoming vehicle or not. When the road is clear, it is best and safe to pass on the right after making sure that the coast is clear.
3 0
3 years ago
Read 2 more answers
System requirements that are important in determining if a software program will work on a computer are ____.
EastWind [94]
The RAM, System Storage ,CPU or GPU and Operating System.
5 0
3 years ago
Other questions:
  • What is an (CR) Optical character recognition?
    13·2 answers
  • Basic rule for java languague
    13·2 answers
  • What is the name of the popular DBMS (database management system) that is open source and is distributed under the General Publi
    15·1 answer
  • Technician A says that the reserve rating of a battery is the amount of steady current that a fully charged battery can supply f
    6·1 answer
  • What two variables does mass depend on?
    5·1 answer
  • In a linked chain implementation of a queue, the performance of the enqueue operation
    10·1 answer
  • Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates R1 = 500 kbps, R2
    14·1 answer
  • How do you determine which type of operating system that best supports your computer or mobile device?
    5·1 answer
  • If the algorithm does not have instructions for unanticipated results, the computer program will
    15·1 answer
  • Computers rarely make mistakes. True or false
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!