Answer Posted / shweta iyer
Size of a class can be calculated by adding up the size of all its data members.
For example:
class student
{
char name[20]; -----> 4*20=80
int rollno[5]; -----> 2*5=10
......
}
So size of class student is 80+10=90.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a C++ Program to check whether a number is prime number or not?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
Can you please explain the difference between using macro and inline functions?
How can I learn c++ easily?
Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort
What do you mean by translation unit in c++?
What are member functions used in c++?
Can we specify variable field width in a scanf() format string? If possible how?
what is software cycle? What is a mission critical system ? What is the important aspect of a real-time system ? Explain the difference between microkernel and macro kernel. Give an example of microkernel.Why paging is used ? Which is the best page replacement algo and Why ? What is software life cycle ? How much time is spent usually in each phases and why Which one do U want to work if selected in Honeywell ? Which are the different types of testing ? What is a distributed system ? Some questions about CSP. Which languages do U know ? What are the differences between Pascal and C. questions from Compiler construction and Lisp. Which are the different computer architecture? What is the requirement in MIMD ? What is the difference between RISC and CISC processors ? Difference between loosely coupled and tightly coupled systems ? What is an open system?
How we can differentiate between a pre and post increment operators during overloading?
How do you show the declaration of a virtual constructor?
Explain the static member function.
Is c++ pass by reference or value?
what are Access specifiers in C++ class? What are the types?
What is the difference between #import and #include in c++?