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
GlobalFon is an international communication company, which offers international prepaid calling cards. They introduced three different types of cards, (1) AsiaFon: is cheapest for

What is major difference between the Historic Unix and the new BSD release of Unix System V in terms of Memory Management? Historic Unix uses Swapping - Whole process is tran

Define File record length ? File record length must be selected to match the data characteristics.

What are the various layers of a file system? The file system is composed of lots of dissimilar levels. Each level in the design uses the characteristic of the lower levels to

Von Neumann architecture was first majoranticipated structure for general-purpose computer. However before consideringmain components of von Neumann architecture let us first elabo

Efficiency of Vector Processing over Scalar Processing As we know a serial computer processes single scalar operands at a time. So if we have to process a vector of length 'n'

1. Detail for each of the four following MIPS instructions, which actions are being taken at each of their five steps. Do not forget to mention how and during which steps each inst

Q. What is CODE SEGMENT? The logical program segment is termed as code segment. When linker links a program it makes a note in header section of program's executable file defin

Q. Explain Passing Parameters Using Pointers ? This method overcomes the drawback of using variable names directly in procedure. It uses registers to pass procedure pointers to

What are the three data anomalise that are likely to occur as a result of data redundancy?