Can I initialize unions?



Can I initialize unions?..

Answer / Siddharth Chaudhary

Yes, you can initialize unions in C by specifying a value for the first member of the union. The other members will be implicitly initialized based on that.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What are the advantages and disadvantages of c language?

1 Answers  


I heard that you have to include stdio.h before calling printf. Why?

1 Answers  


Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June

0 Answers  


Explain c preprocessor?

1 Answers  


C program to find all possible outcomes of a dice?

1 Answers  


What is the difference between functions abs() and fabs()?

1 Answers  


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

1 Answers  


what is the use of getch() function in C program.. difference b/w getch() and getche()??

29 Answers   HCL, IBM, Infosys, TCS, Wipro,


x=y=z=1 z=++x||++y&&++z Printf("%%%d";xyz) what is the values of x,y and z?????

3 Answers  


main() { float a=8.8; double b=8.8; if(a==b) printf("Equal"); else printf("not equal"); getch(); } what is the output? with reason

6 Answers   CSC,


WHAT IS LOW LEVEL LANGUAGE?

2 Answers  


in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?

11 Answers   IBM,


Categories