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

What are the basics of local (auto) objects?

871


What is meant by entry controlled loop? What all C++ loops are exit controlled?

855


Can we delete this pointer in c++?

990


Can static member variables be private?

895


Why we use #include iostream in c++?

806


Is it possible to pass an object of the same class in place of object reference to the copy constructor?

823


When are exception objects created?

830


What is stack unwinding?

837


Explain storage qualifiers in c++.

842


Does std endl flush?

824


What is lambda in c++?

923


What is the difference between an array and a list?

815


What is the difference between #define debug 0 and #undef debug?

927


How does class accomplish data hiding in c++?

948


What are the benefits of c++?

819