Answer Posted / hitesh sojitra
When you calculate the size of a empty class that time you can c it takes 1 byte.which is the size of a char which a compiler takes for storing the address of a empty class.
The size of an empty class would depend on what is the range specified for the compiler for char. It takes that much space to store the address of a class.
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.
How do I start a c++ project?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
What is #include iostream h in c++?
What is split a string in c++?
What is the basic structure of a c++ program?
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
Which bit wise operator is suitable for checking whether a particular bit is on or off?
What is general format for a prototype?
Write a program which uses Command Line Arguments
How long it will take to learn c++?
What are the various operations performed on stack?
Is c++ still being used?
What is type of 'this' pointer? Explain when it is get created?
Write a function that swaps the values of two integers, using int* as the argument type?