What is the use of unions in c ?, Computer Engineering

Unions allow the same area of memory to be accessed as different data types. The insurance example above would not work.

Unions are useful (often in embedded programming) when it is needed to refer to a data item as two or more different types: e.g. it may be used as an integer for math, but an array of bytes for a serial transmission or a checksum calculation.

Posted Date: 3/11/2013 5:55:09 AM | Location : United States







Related Discussions:- What is the use of unions in c ?, Assignment Help, Ask Question on What is the use of unions in c ?, Get Answer, Expert's Help, What is the use of unions in c ? Discussions

Write discussion on What is the use of unions in c ?
Your posts are moderated
Related Questions
What do you understand by Electronic Funds Transfer?  Electronic Funds Transfer: It's an electronic payment method that transfers the money value from one bank account to

What are different normalization forms? 1NF: Eliminate Repeating Groups Make a separate table for every set of related attributes, and give each table a primary key. Each fie

Q. Illustration of cache size of a system? Cache Size: Cache memory is very costly as compared to main memory and therefore its size is generally kept very small.  It has bee

zero, one, two three address instructions


Explain Open source software? Open Source Software is software for which the underlying programming code is available to the users so that they might be read it, make changes t

A computer manipulates data consistent with instructions of a stored program. Stored program means that the data and program are stored in same memory unit. Central processing unit

What is pipelining? What are the various hazards encountered in pipelining?  Explain in detail. The major characteristics of a pipeline are: a) Pipelining cannot be exe

There are situations, called hazards that stop the next instruction in the instruction stream from implementing during its designated clock cycle. Hazards decrease the performance

In class SlotCollection, remove the fields slot1, slot2, slot3 and slot4 and replace them by an array of slots. Modify the rest of the program to work using this array. There is