How much is size of struct having 1 char & 1 integer?
Answer Posted / raja
you will have to study through structure padding concepts.
It depends on the compiler.
struct
{
char a;
int b;
}
The above struct size will be 8 in standard compilers (Turbo
C is a non-standard compiler). bcoz between a and b there
will be 3 pad bytes placed..
Refer this link you will know everything about structure
padding..All d best :)
http://www.allinterview.com/showanswers/62991.html
Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is the need of a destructor?
What is the function to call to turn an ascii string into a long?
What is encapsulation in C++? Give an example.
How do you declare A pointer to a function which receives nothing and returns nothing
What are c++ manipulators?
Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be
What is called array?
What are the effects after calling the delete this operator ?
What is the this pointer?
How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?
What is a breakpoint?
What is the use of pointer in c++ with example?
Which operator cannot be overloaded c++?
Which bit wise operator is suitable for putting on a particular bit in a number?
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?