explain about storage of union elements.
Answers were Sorted based on User's Feedback
Answer / anandi
Union elements can share the common memory spaces.
For eg.
union stu
{
int rno;
int mark;
float total;
};
In this pg, the compiler allocates 4 bytes to store the
union members. Bcoz, in this pg, the float data type only
requires the large memory size, ie, 4 bytes. And the
remaining members can share this 4 bytes. So if u want to
store rno, it will allocate the first 2 bytes.
And also we can store only one value at a time to the
memory.
| Is This Answer Correct ? | 6 Yes | 0 No |
Can you please explain the difference between syntax vs logical error?
What do you understand by normalization of pointers?
what different between c and c++
Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen)
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} what would be the output?
What is a spanning Tree?
what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")
7 Answers Cadence, JNTU, Zen Technologies,
when i declare as: void main() { clrscr(); int a=10; printf("%d",a) } my problem that why generate a error in above programs. please tell me answer seriously .
Why is a semicolon (;) put at the end of every program statement?
How can we open a file in Binary mode and Text mode?what is the difference?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
Explain #pragma statements.