Explain the defination and declaration of union, C/C++ Programming

Assignment Help:

Explain the Defination and Declaration of Union?

Generally in terms the composition of a union may be defined as be as

union tag
{
member 1;
member 2;
member m;
};

Where union is a necessary keyword and the other terms have the same meaning as in a structure definition.

Individual union variables are able to then be declared as

storage-class union tag variable1, variable 2, ..., variable n;

Where storage-class is an elective storage class specifier, union is a needed keyword, tag is the name that appeared in the union definition and variable 1, variable 2, ..., variable n are union variables of type tag.


Related Discussions:- Explain the defination and declaration of union

Flow chart, flow chart for calculating the volume of sphere

flow chart for calculating the volume of sphere

C program to check prime numbers , C Program to check PRIME NUMBERS   ...

C Program to check PRIME NUMBERS   main() {           int i,k,r,flag;           clrscr();           printf("ENTER THE NO. TO CHECK IT IS PRIME OR NOT: ");

Stone game, how to write a c program for stone game

how to write a c program for stone game

Explain compound assignment operators, Compound Assignment Operators Ap...

Compound Assignment Operators Apart from the binary and the unary arithmetic operators, we also have compound assignment operators. These are +=, -=, *=, /=, %=. Using these op

Need cron job parsing json from api, Need Cron Job Parsing JSON from API, I...

Need Cron Job Parsing JSON from API, Inserting in to DB Project Description: The Project is to prepare a Cron Job with an adjustable interval in seconds and milli seconds. Cr

Explain some string oriented library functions, Explain some String Oriente...

Explain some String Oriented Library Functions? To make simpler string processing we can use special string oriented library functions. Mainly the C compilers include library f

Function that have parameter and makes an integer mask, Write a function th...

Write a function that has an int parameter n, makes an integer mask having the bit 1 at the nth place from the rightmost bit, and returns the mask. For example, when n = 5 is passe

Procedure to add two numbers in a recursive manner, (a) Write a procedure c...

(a) Write a procedure called (add x y) that adds two numbers in a recursive manner. Specifically, note that x + y = (x + 1) + (y - 1) and x + 0 = x. (b) Using the substitution m

Explain call by reference, Call by Reference Passing variables(paramete...

Call by Reference Passing variables(parameters) to a function in C can be done in two ways - pass by value, also called as call by value and pass by address or also known as ca

Area under curve, write a program to find the area under the curve y=f(x) b...

write a program to find the area under the curve y=f(x) between x=a & x=b

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd