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]
4 years ago
9

Define Class in C++. Briefly discuss.

Computers and Technology
1 answer:
lesya [120]4 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
Which wireless communication technology is most likely used when synchronizing device information to an automobile?
seropon [69]
Bluetooth is the most reasonable answer
8 0
4 years ago
Complete the sentence.
Artemon [7]

Answer:

encrypted

Explanation:

to prevent others from viewing it

4 0
2 years ago
Read 2 more answers
What is radial gradient in Flash CS3
djverab [1.8K]

Answer:

Radial gradients radiate from a center focal point. Both can be edited for color, alpha, and position within a fill or stroke. You can add up to 16 colors to a gradient, precisely control the location of the gradient focal point, and apply other parameters. A gradient behaves like any other fill or stroke.

8 0
3 years ago
How do you hack a iPhone, Like If you forgot your password and want to get back in your phone. What do you do?
s344n2d4d5 [400]

Answer:

fix it on itunes

Explanation:

or get a new one

6 0
3 years ago
Read 2 more answers
Write a Python program to replace at most 2 occurrences of space, comma, or dot with a colon. Hint: use re.sub(regex, "newtext",
charle [14.2K]

Explanation:

The "re" module in python provides various functions to perform complex string operations easily.

For example, you can check whether a specific word exists in a given string or to replace it with some other word.  

Some of the functions in the re module are:

re.findall

re.search

re.sub()

We are particularly interested in the re.sub() function, we can use this function to replace the occurrences of space, coma or dot with semicolon.  

Syntax:

re.sub(pattern, replace, target_string, n).  

Where pattern = space, coma or dot  

replace = semicolon  

target_string = any string containing spaces, coma and dots

n = number of times you want the replacement to be done  

Code:

import re  

target_string = "Hello world,code,code."  

replace = ":"

pattern = "[ ,.]"

print(target_string)

print(re.sub(pattern, replace, target_string, 2) )

Output:

Hello world,code,code.

Hello:world:code,code.

It replaced the first white space and coma with semicolon, if we increase the n to 4 then the output is

Hello:world:code:code:

As expected, it replaced all of the space, coma, and dots with semicolons.

7 0
4 years ago
Other questions:
  • Web and mobile applications allow users to be actively engaged in an online activity
    5·2 answers
  • A program is divided into 3 blocks that are being compiled on 3 parallel computers. Each block takes an Exponential amount of ti
    6·1 answer
  • Which of the following is a good technique to use when driving in an urban environment
    6·2 answers
  • When backing up a database server to LTO tape drives, the following schedule is used. Backups take one hour to complete.
    12·1 answer
  • What is the different between 32bit anf 64 bit verision​
    11·1 answer
  • You can use______ in order to allow the user to browse and find a file at run time.
    15·1 answer
  • List the steps you took to configure SERVERC and take a screen shot of the Connect to DNS Server dialog box by pressing Alt+Prt
    11·1 answer
  • Four categories of installer apps
    13·1 answer
  • How 0x86 processor store 0x12345678 in memory ​
    13·1 answer
  • Write a MIPS assembly language program that adds the following two integers and displays the sum and the difference. In the .dat
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!