Struct(s)
{
int a;
long b;
}
Union (u)
{int a;
long b;
}
Print sizeof(s)and sizeof(u) if sizeof(int)=4 and
sizeof(long)=4
Answers were Sorted based on User's Feedback
Answer / jack
I assume above code to be correctly written as below:
struct s
{
int a;
long b;
}
Union u
{int a;
long b;
}
sizeof(s)= 8
sizeof(u) = 4
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / vikraman85
Size fo strucure wil be the total bytes of the datatypes
inside it..
so,4+4=8;
For unions the size wi be the size of the datatype whose
memory is high,.
so,its 4,.
| Is This Answer Correct ? | 7 Yes | 0 No |
Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d
what is the purpose of the code, and is there any problem with it. unsigned int v[10]; unsigned int i = 0; while (i < 10) v[i] = i++;
can anyone proide me reading material on svit00ef27@yahoo.com please thanx in advance
Is it valid to address one element beyond the end of an array?
What is a pointer in c plus plus?
totally how much header files r in c language
main() { int i=5; printf("%d%d%d%d",i++,i--,i); }
Where are some collections of useful code fragments and examples?
What's wrong with "char *p; *p = malloc(10);"?
What is a static function in c?
write a c program to convert fahrenheit to celsius?
Explain the difference between malloc() and calloc() function?