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

Show the application of a dynamic array with the help of an example.

599


. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?

2773


Why is swift so fast?

632


Explain how an exception handler is defined and invoked in a Program.

600


How to allocate memory dynamically for a reference?

555






Should the this pointer can be used in the constructor?

564


In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....

1958


What is the difference between the parameter to a template and the parameter to a function?

650


Why is null pointer used?

698


What is low level language in simple words?

571


What is a v-table?

656


What do you mean by “this” pointer?

628


What is the v-ptr?

651


How static variables and local variablesare similar and dissimilar?

575


What is the type of 'this' pointer? When does it get created?

555