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
Answer Posted / 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 |
Post New Answer View All Answers
What are the different types of linkage exist in c?
Tell me the use of bit field in c language?
All technical questions
4. main() { int c=- -2; printf("c=%d",c); }
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
Do you know what are bitwise shift operators in c programming?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
Why does notstrcat(string, "!");Work?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
Define Spanning-Tree Protocol (STP)
What is the difference between declaring a variable by constant keyword and #define ing that variable?
How can I find out the size of a file, prior to reading it in?
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
What does the characters “r” and “w” mean when writing programs that will make use of files?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset