Home » Ask & Discuss » Board Exams - CBSE, ICSE, State Boards » Computer Science « Back to Discussion



Computer Science

anakonda's Avatar
Blazing goIITian

Joined: 10 Oct 2008
Post: 634
23 Mar 2009 18:02:33 IST
0 People liked this
2
210 View Post
how to calculate that how many bytes are required for an object of a particular class?
None

how to calculate that how many bytes are required for an object of a particular class?


Share this article on:

Comments (2)

Feuer Zaber's Avatar

Blazing goIITian

Joined: 12 Jul 2008
Posts: 310
23 Mar 2009 18:11:42 IST
1 people liked this

Simple.If its a single class,just count the no of bytes required for the variables alone.Avoid the functions.

 

Now,if the class is inherited,regardless of the scope used in inheritace(pri or P or pub) add all the bytes in the main classes to the size of the subclass(You need to add private members also,since in inheritance,private members are inherited,its just that none of the base classes have access privilages to it.It may  be confusig,but its given in the text.)

 

cheers!

SRIKSHADY - Determined & self-motivated for IIT's Avatar

Blazing goIITian

Joined: 19 Jan 2008
Posts: 360
23 Mar 2009 20:33:50 IST
0 people liked this

Related to this, can some 1 plz check the answer vto Q2d of last year's paper?



Quick Reply


Reply

Some HTML allowed.
Keep your comments above the belt or risk having them deleted.
Signup for a avatar to have your pictures show up by your comment
If Members see a thread that violates the Posting Rules, bring it to the attention of the Moderator Team
Free Sign Up!

Preparing for IIT-JEE ?

Arihant Revision Package for IIT JEE - Books, Practice Tests + Rank Predictor


@ INR 1,995/-

For Quick Info

Name

Mobile No.

Find Posts by Topics

Physics.

Topics

Mathematics.

Chemistry.

Biology

Parents

Board

Fun Zone

Sponsored Ads