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
Dear sir, I want to read Excel file and display it in grid view(the headings in excel file should be grid view column heading).This should be coded in C# Windows forms Application

Array Processing We have seen that for executing vector operations the pipelining conception has been used. There is other method for vector operations. If we have array of n p

why we use void main in c progrmeing

What is the difference between latches and flip-flops based designs Latches are level sensitive whether flip-flops are edge sensitive. So, latch based design and flop based des

It depends on our requirement. When we are needed an integer to be stored in 1 byte (means less than or equal to 255) we use short int, for 2 bytes we use int, for 8 bytes we use l

Which of the best method between linear addressing and matrix addressing modes ? Ans: Best Method: Matrix Addressing is the suitable method, since this configuration on

There are many different forms of micro-controller and a manufacturer, selecting the proper micro-controller for your application is one of the critical decisions which controls th

What are the different types of parameters? Formal Parameters: Parameters, which are described during the definition of subroutine with the FORM statement.

a. List the ACID properties. Describe the usefulness of each. b. During its implementation, a transaction passes by several states, until it finally commits or aborts. List all

Bernstein Conditions for Detection of Parallelism For implementation of instructions or block of instructions in parallel, it should be guaranteed that the instructions are ind