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
a) Write a program that figures out how long it will take to pay off a credit card by making payments of $10 every month. Take care to avoid infinite loops. (How would a bank preve

Explain Session Layer of OSI Model. The session layer manages, establishes and terminates communication sessions. Communication sessions contain service of requests and serv

To avoid race condition, the maximum number of processes that may be simultaneously inside the critical section is The maximum number of processes is one to ignore race conditi

The main function of a browser is to? The important function is to interpret HTML of a browser.

What is binary adder? Binary adder is constructed with full adder circuit linked in cascade, with the output carry from one full adder linked to the input carry of next full ad

Poor Technology or System Requirements Definition - Information System Previously we looked at product design and specifically the importance of requirements capture as part o

Q. Explain about Transmission Media? These, also known as physical channels, can be either bounded or unbounded. Bounded media, in which signals representing data are confined

Explain the Input Stage of an ADC. Ans. Input Stage- In ADC at the input stage, analog voltage can contain any value in a range although the digital output can contain

Factor which helps in analysis of parallel algorithms is the total number of processors needed to deliver a solution to a provided problem. So for a given input of size let's say n

Why is catch (Exception) almost always a bad idea?  Well, if at that point you know that an error has happened, then why not write the proper code to handle that error instead