What is an anonymous union and where to apply that ?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / monisha
anonymous union is a class name.it cannot be followed by
the declarator.it must be declared with the keyword
static.it cannot have protected and private members.
Is This Answer Correct ? | 2 Yes | 0 No |
Is malloc memset faster than calloc?
What should not contain a header file?
How can I set an array's size at run time?
program to find the roots of a quardratic equation
Is fortran still used today?
wt is d full form of c
Can main () be called recursively?
main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0; } a)0 1 6 2 b)0 1 6 7 c)Compilation error d)None of the above
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
what is the c.
what is a stack
main() { printf("hello%d",print("QUARK test?")); }