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
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What is the newline escape sequence?
What is assert and when would I use it?
What does the characters “r” and “w” mean when writing programs that will make use of files?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What's the difference between constant char *p and char * constant p?
using for loop sum 2 number of any 4 digit number in c language
What are two dimensional arrays alternatively called as?
What are the different properties of variable number of arguments?
Explain the properties of union.
What is structure in c explain with example?
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
Describe the header file and its usage in c programming?
What is meant by type casting?
What is structure data type in c?