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 |
What is the difference between memcpy and memmove?
How do you determine a file’s attributes?
What are the types of operators in c?
What is the meaning of ?
for example user gives input as " 20 or 20.0 or rs 20.0 or 20.00 or rs20 and so .. on " and the output should be stored as " rs.20.00 " in a variable
Do you know the use of fflush() function?
What is a built-in function in C?
swap 2 numbers without using third variable?
for(i=0;i=printf("Hello");i++); printf("Hello"); how many times how will be printed?????????
Can a local variable be volatile in c?
Write a programme to find even numbers without using any conditional statement?
3 Answers ADD Software, Infosys,
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration