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

Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?

2244


What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

762


Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .

931


Is it possible to use a new for the reallocation of pointers ?

816


What are enumerations?

868


How would you implement a substr() function that extracts a sub string from a given string?

797


What is public, protected, private in c++?

891


What is ios :: in in c++?

842


What is the difference between c++ and turbo c++?

809


What is the difference between a baller and a reference in C++?

818


What is the difference between prefix and postfix versions of operator++()?

834


Explain linked list using c++ with an example?

824


What does floor mean in c++?

827


Is swift a good first language?

794


Difference between pointer to constant vs. Pointer constant

834