What is size of class having no variable & 1 function which returns int

Showing Answers 1 - 6 of 6 Answers

babasakthi

  • Jul 25th, 2006
 

integer constant always occupies two bytes in memory,so in 16 bits ,highest bit is used to store the sign of the integer.thats all i know

  Was this answer useful?  Yes

RAJEEV CHOPRA

  • Sep 8th, 2006
 

I am unable to understand the question.

A method of the class is returning Int and What is the class size?

  Was this answer useful?  Yes

Sumit

  • Sep 29th, 2006
 

Size would be one.

because class doesnt have any data and a member function.what member function return it doesnt matter.and small unit is 1 in memory so it size will be 1.

rajat

  • May 15th, 2007
 

Actually size of class having no variable but only 1 function is determined by the variables size declared in that fuction. So the size of the class will be the total size of variables which have been declared in that member function.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions