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 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

Post New Answer

More C Interview Questions

Why clrscr is used in c?

0 Answers  


What does 4d mean in c?

0 Answers  


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

0 Answers  


can u write a program in C, which does not use = (eqaul)or any arithmatic assignment(like -=,+=,*= etc) operator to swap to number?

2 Answers  


write C code to reverse a string such that if i/p is "abc defg hij klmno pqrs tuv wxyz" and the o/p should be "cba gfed jih onmlk srqp vut zyxw"

2 Answers  






What is a spanning Tree?

1 Answers   TCS,


write a program for odd numbers?

15 Answers  


What are the advantages and disadvantages of pointers?

0 Answers  


What is a function simple definition?

0 Answers  


Is fortran faster than c?

0 Answers  


implement general tree using link list

1 Answers   Wipro,


give one ip, find out which contry

4 Answers   Google,


Categories