GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Concepts  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 18 of 65    Print  
what is size of class having no variable & 1 function which returns int

  
Total Answers and Comments: 4 Last Update: May 15, 2007     Asked by: anamika 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Sumit
 

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.



Above answer was rated as good by the following members:
VCCoder
July 25, 2006 04:46:01   #1  
babasakthi Member Since: July 2006   Contribution: 1    

RE: what is size of class having no variable & 1 funct...

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


 
Is this answer useful? Yes | No
September 08, 2006 17:08:58   #2  
RAJEEV CHOPRA        

RE: what is size of class having no variable & 1 funct...

I am unable to understand the question.

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


 
Is this answer useful? Yes | No
September 29, 2006 01:41:40   #3  
Sumit        

RE: what is size of class having no variable & 1 funct...

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.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 15, 2007 08:46:23   #4  
rajat        

RE: what is size of class having no variable & 1 funct...
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.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape