How much is size of struct having 1 char & 1 integer?

Answer Posted / shahbaz

as the size of char in C++ and C is one byte and the size of
int in C++,c is 2 byte so when we illl call that struct then
the memory will assigned the contents of these char and
int's variables
But
Char in C# and java is of 16 bit and in is of 32 bits and
double of 64 bits so the size of struct is depends upon
these languages.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If you don’t declare a return value, what type of return value is assumed?

538


How do I make turbo c++ full screen?

579


What is the use of object in c++?

563


What are enumerations?

651


What is the difference between reference and pointer?

610






How to access a variable of the structure?

582


What is a string example?

545


Explain the use of vtable.

611


What is capacity in vector in c++?

542


What is the basic difference between C and C++?

618


Is there a c++ certification?

597


What is the use of map in c++?

599


How do I download c++?

565


What is c++ used for in games?

600


List down the guideline that should be followed while using friend function.

644