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

How do you compile the source code with your compiler?

620


Differentiate between declaration and definition.

587


Explain deep copy?

608


What are the two main components of c++?

591


Is arr and &arr are same expression for an array?

585






Explain what you mean by a pointer.

633


What is java and c++?

666


We use library functions in the program, in what form they are provided to the program?

602


What do you mean by stack unwinding in c++?

732


How the endl and setw manipulator works?

560


What is a .lib file in c++?

572


What is the difference between set and map in c++?

610


What is a manipulator in c++?

717


Can we use clrscr in c++?

536


Which software is best for coding?

574