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
Classify data networks. Data Network Classifications: Data Networks are classified as per to their geographical coverage: - Wide area networks (WANs) - Metropolitan ar

Explain the types of hardware used in supermarkets These use many types of specialist I/O hardware. For instance: -  Bar code readers/scanners (to read product details and e

Closed System: It's isolated from environment influences. It operates on factors within System itself. It is also described as a System which involves a feedback loop, a control e

Discuss two main approaches to reuse free memory area in a heap. Two major approaches to reuse free memory area in a heap are: First-fit: Allocate the first hole which i

Q. Illustrate Basic strategy used in RAID? Basic strategy used in RAID is to replace large capacity disk drive with multiple smaller capacity disks. Data on these disks is dist

What is Page-Stealer process? This is the Kernel process that makes rooms for the incoming pages, by swapping the memory pages that are not the part of the working set of a pro

Q. Explain Keyboard Input and Video output ? A Keystroke read from keyboard is termed as a console input and a character displayed on the video screen is known as a console out

Q. Show the Connections used in Sound cards? Sound cards must have connections to allow different functions.  One of the most significant is MIDI port (MIDI signifies Musical I

The documentation rules are almost exactly the similar as for Scripts "Documenting scripts". Although from a technical point of view it is feasible to place measures in libraries i

Q. Perform division in binary showing contents of accumulator, B register and Y register during each step. (Accumulator, B, Y are 5-bit registers) 13 / 2