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

Give explanation about the use of SSL to secure the network. SS L stands for Secure Sockets Layer is a protocol developed through Netscape for transmitting private document

By 2 pointers you can find it. One of them goes 2 nodes each time. The second one goes at 1 node each time. If there is a cycle, the one that goes 2 nodes every time will eventuall

Evaluation Functions: Evaluation functions calculate approximately the score which can be prove of guaranteed if a particular world state is reached. Same like in chess, evalu

Q. Illustrate Master-Slave Flip-Flop? Master slave flip-flop comprise two flip-flops. One is master flip-flop and other one is known as slave flip-flop. Fig below shows impleme

What is a union ? A union, like a structure, is a derived type. Unions follow the same syntax as structures but have members that share storage. A union type defines a set of alt

Simulated Annealing: One way to get around the problem of local maxima, and related problems like ridges and plateaux in hill climbing is to allow the agent to go downhill to

What do you mean by memory mapped I/O? In Memory mapped I/O, there is no particular input or output instructions. The CPU can manipulate I/O data residing in interface register

How can we change almost any algorithm to have a good best case running time? Check whether the input constitutes an input at the very starting Or else run the original algo

Register-to-Register Architecture : In this organization, results and operands are accessed not directly from the main memory by the scalar or vector registers. The vectors which a