what are the advantages & disadvantages of unions?
Answers were Sorted based on User's Feedback
Answer / vishnu nayak
Union occupy same memory area for different members in a
union.
Same are is allocated for different data types of the
members of union
eg:
union
{
int a;
char c;
float f;
}temp;
Size of Float will be size of union.
same memory is used for char and int as well.
Advantages: Memory consumption is less.
Disadvanteges: if one of the member variable is updated the
it will be reflected in the remaining 2 variables.
| Is This Answer Correct ? | 62 Yes | 18 No |
Answer / vadivelt
Main disadvantage is, all the union member variables cannot
be initialised or used with different values at a time.
| Is This Answer Correct ? | 45 Yes | 14 No |
what is event driven software and what is procedural driven software?
How do I get a null pointer in my programs?
write a program fibonacci series and palindrome program in c
0 Answers Aditi Placement Service,
What are file streams?
explain what are pointers?
find second largest element in array w/o using sorting techniques? use onle one for loop.
15 Answers BitWise, Zycus Infotech,
how to add two numbers without using arithmetic operators?
write a program to rearrange the array such way that all even elements should come first and next come odd
What is a segmentation fault?
When should a type cast not be used?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
can you explain in brief what is "r+" mode in a file... i know that it si used to read and modify rhe existing content.... but explalanation about the file pointer in "r+" mode i wann to know???????????