Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

What is an anonymous union and where to apply that ?

Answers were Sorted based on User's Feedback

What is an anonymous union and where to apply that ?..

Answer / swetcha

An anonymous union is a union without a name. It cannot be
followed by a declarator. An anonymous union is not a type;
it defines an unnamed object.

The member names of an anonymous union must be distinct
from other names within the scope in which the union is
declared. You can use member names directly in the union
scope without any additional member access syntax.

Is This Answer Correct ?    4 Yes 1 No

What is an anonymous union and where to apply that ?..

Answer / priya

Anonymous unions are unions that are declared without a class-name or declarator-list.

union { member-list }

Such union declarations do not declare types
but they declare objects
They must also be declared as static if
declared in file scope. If declared in local scope
they must be static or automatic.

Is This Answer Correct ?    3 Yes 0 No

What is an anonymous union and where to apply that ?..

Answer / monisha

anonymous union is a class cannot be followed by
the must be declared with the keyword cannot have protected and private members.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Interview Questions

Why are algorithms important in c program?

0 Answers  

when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none

7 Answers   HCL,

What is difference between class and structure?

0 Answers  

write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values.  The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.

0 Answers  

what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }

4 Answers  

How to add two numbers with using function?

2 Answers   Miracle Solutions,

LOGIC OF Bodmas?

1 Answers  

What is the sizeof () a pointer?

0 Answers  

how can I convert a string to a number?

0 Answers  

Is there any possibility to create customized header file with c programming language?

0 Answers  

Why is conio.h not required when we save a file as .c and use clrscr() or getch() ?

2 Answers  

what is the mean of c languages.

1 Answers   Polaris,