Answer Posted / vadivelt
Since Union follows the memory sharing concept, it is not
possible to initialise all union varibles at a time.
ie.,
union name
{
int a;
char b;
}c = {10, 'a'};
is not possible.
But it is possible to initialise one value at a time.
ie.,
union name
{
int a;
char b;
}c = {10};
or
union name
{
int a;
char b;
}c = {'a'};
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is the use of in c?
Write a Program to accept different goods with the number, price and date of purchase and display them
What is floating point constants?
What is the sizeof () operator?
What is meant by type casting?
Why is c fast?
List out few of the applications that make use of Multilinked Structures?
Can the sizeof operator be used to tell the size of an array passed to a function?
Is that possible to store 32768 in an int data type variable?
What is C language ?
what are bit fields? What is the use of bit fields in a structure declaration?
What is structure packing in c?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
What will be the outcome of the following conditional statement if the value of variable s is 10?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters