answersLogoWhite

0

Add your answer:

Earn +20 pts
Q: What is the importance of union in c program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the importance of using functions in a c program?

C programs do not function without functions.


Write a c program to generate student mark details using union and find total and average and grade?

write a c program to display marks,total,average,grade using union


What is union in c program?

It's a fragment of memory shared by multiple variables.


What is the importance of union in a c program?

Importance of union in 'C': unions are the concept borrowed from structures in structures we allow different datatypes in which each datatype is allocated a separate memory location .But in unions same as structures we use different data types but all the datatypes will be allocated to a single memory location and only one datatype with maximum size will be used for allocation of all the data types used in a union program.Sample code for union is as follows: union item { int m; float c; char x; }code; In the above program we used three kinds of datatypes here integer size is 4 so the other data types will be shared in the same location of size 4.then the memory will not be wasted and all the memory will be utilized perfectly.


What is the importance of functions in a c plus plus program?

Functions are very important in C++, as you can't write the simplest program to print hello without using a function. Overall you can say that function are building blocks of a C++ program. Functions can also be defined by the programmer to reduce program size.


The fields in a c program are by default private is true or not?

I guess you mean C++, not C.Data fields of a structure/union are public by default,those of a class are private by default.


What is a union in c program?

A union, is a collection of variables of different types, just like a structure. However, with unions, you can only store information in one field at any one time


Features of c program?

the features of a C program


C program was introduced in the year?

c program was introduced in the year 1972 by Dennis RitchieNo, it was the C language, not the C program.


How do you solve A intersecting B union C?

The answer depends on whether you mean A intersecting (B union C) or (A intersecting B) union C.


What is executive a c program?

I think it is 'execution of a C program'.


C program on left factoring in compiler design?

how to create a c program for left factoring.