What is size of a object of following class?
class Foo
{
public:
void foo(){}
}
Answer Posted / jitendra varshney
The size of the object here will be 1. Because by default,
if no variable is declared in the class the size of object is 1.
this is due to fact that when two or more object of the
class is defined then they would have the different
addresses. But if size would have been zero then it might be
possible that two or more object can have the same address.
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are literals in C++?
What is boyce codd normal form in c++?
Describe linkages and types of linkages?
Who discovered c++?
What is virtual base class?
Is linux written in c or c++?
What kind of jobs can I get with c++?
What are the basics of local (auto) objects?
What are function prototypes?
Explain container class.
Is c++ the best programming language?
A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.
Can turbo c++ run c program?
Is eclipse good for c++?
What is vector pair in c++?