No products in the cart.

Ask questions which are clear, concise and easy to understand.

Ask Question
  • 0 answers
  • 0 answers
  • 0 answers
  • 1 answers

Sia ? 3 years, 5 months ago

 

Constructor

Destructor

Purpose

Constructor is used to initialize the instance of a class.

Destructor destroys the objects when they are no longer needed.

When Called

Constructor is Called when new instance of a class is created.

Destructor is called when instance of a class is deleted or released.

Memory Management

Constructor allocates the memory.

Destructor releases the memory.

Arguments

Constructors can have arguments.

Destructor can not have any arguments.

Overloading

Overloading of constructor is possible.

Overloading of Destructor is not possible.

Name

Constructor has the same name as class name.

Destructor also has the same name as class name but with (~) tiled operator.

Syntex

ClassName(Arguments)
{
//Body of Constructor
}

~ ClassName()
{
}

  • 0 answers
  • 0 answers
  • 0 answers
  • 1 answers

Sia ? 5 years, 2 months ago

The method flush() flushes the internal buffer, like stdio's fflush. This may be a no-op on some file-like objects. Python automatically flushes the files when closing them. But you may want to flush the data before closing any file.

  • 0 answers
  • 1 answers

Sia ? 5 years, 2 months ago

<pre> #include<iostream> #include<stdlib.h> using namespace std; int main() { float x=5.999; float *y,*z; y=&x; z=y; cout<<x<<","<<*(&x)<<","<<*y<<","<<*z<<"\n"; return 0; } </pre>

Output

<pre> 5.999,5.999,5.999,5.999 </pre>

Explanation
The reason for this is x gives the value stored in the variable x. *(&x) gives the data value stored in the address &x i.e., the data value of x. Since y points to x (..y=&x), *y gives the value of x. And because z has the same address as that of y, *z also gives the value of x i.e., 5.999.

  • 2 answers

Aman Kumar 5 years, 2 months ago

Yaah..its correct...but it will better if we put the range(1,11)......For i in range(1,11): print(8*i)....

Hemant Tiwari 5 years, 2 months ago

For i in range (11): A=8*i Print(A)
  • 0 answers
  • 1 answers

Mahima Yadav 5 years, 2 months ago

A URL (Uniform Resource Locator) is a unique identifier used to locate a resource on the internet. It is also referred to as a web address. URLs consist of multiple parts -- including a protocol and domain name -- that tell a web browser how and where to retrieve a resource.
  • 1 answers

Bhimsen Naik 5 years, 2 months ago

What is URL
  • 2 answers

Suvansh Khurana 5 years, 2 months ago

Data file handling-DFH

Suvansh Khurana 5 years, 2 months ago

In DFH use ios::binary mode while opening a file
  • 2 answers

Suvansh Khurana 5 years, 2 months ago

Include even the private member's

Suprit Raj 5 years, 2 months ago

In every type of inheritence the total no. Of bytes will be sum of sizes of all data types used in the parent and child class
  • 2 answers

Priya Dharshini ? 5 years, 2 months ago

SUmita arora,preeti arora and ncert.. use any of these

Ishan G❤ 5 years, 2 months ago

If your language is python in cs then sumit arora dhanpat rai publications is best
  • 2 answers

Priya Dharshini ? 5 years, 2 months ago

YA it is there.. first section only for c++ next section only for python and 3rd is for both..

Ishan G❤ 5 years, 2 months ago

Hope sooo
  • 3 answers

Deeya Singh 5 years, 1 month ago

Yes

Ishan G❤ 5 years, 2 months ago

Yep

Rohit Sharma 5 years, 2 months ago

yes....because python revision tour contains a summary of class 11 python........be sure to get prepared with python and sql...
  • 0 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App