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 are the advantages and disadvantages of macro pre-processor? Advantages Any of existing conventional assembler can be improved in this way to incorporate macro proces

Data Dependency:   It refers to the state in which two or more instructions split same data. The instructions in a program can be given based on the relationship of data dependency

Discuss the risks of having a single root user and how more limited management abilities can be given to others users on Linux/UNIX systems

Question : a) Hard disk is an important component of a computer. What type of memory is it? b) With the help of a diagram describe its features. c) Explain its working pr

Boolean algebra. Boolean algebra mathematical method based on human reasoning. In Boolean algebra only two states exist; true and false which are written as 1 (true) and 0 (fa

Determine the Define Byte - Assembler directives DB (Define Byte): DB directive defines a byte-type variable (i.e. a variable that occupies one byte of memory space). In a give

Message in C++ : * Objects converse by sending messages to each other. * A message is sent to invoke a method in C++.   Method in C++: * Gives response to a message

What is most common biometrics? Explain in brief. The most common biometrics is as given below: Face geometry (Photo): The computer captures the picture of your face and m

Explain the Client-Server Interaction Using Messages As we have learned, client- server interaction may be managed in many ways. A message- based interaction is perhaps the bes

Remote-load Latency Problem:  When one processor requires some remote loading of data by other nodes, then the processor need to wait for these two remote load operations. The long