Write a program that illustrate union declaration, C/C++ Programming

Assignment Help:

Write a Program that illustrate union declaration?

A C program encloses the following union declaration:

union id
{
char color[12];
int size;
} shirt, blouse;

At this time we have two union variables, blouse and shirt, of type id. Each variable is able to represent either a 12-character string (color) of an integer quantity (size) at anyone time.

The 12-character string will require additional storage area within the computer's memory than the integer quantity. Consequently a block of memory large sufficient for the 12-character string will be allocated to every union variable. Thus compiler will automatically distinguish between the 12-character array and the integer quantity within the given block of memory as required.


Related Discussions:- Write a program that illustrate union declaration

Static data members and static member function, Static Data Members: A ...

Static Data Members: A data member inside the class can construct as static data member.   There are few guidelines to be followed when declaring static data member.

Luminous Jewels, Jewels can only be removed for polishing from either end o...

Jewels can only be removed for polishing from either end of the necklace

#title.Thick line, #questio c++ program for drawing thick line

#questio c++ program for drawing thick line

KRPano, I am seeking an expert to create a 360 degree virtual tour in KRPan...

I am seeking an expert to create a 360 degree virtual tour in KRPano for use on PCs, tablets and smartphones. You will be given with panoramas in order to create an advanced KRPano

Programming and solving problems with a computer, One person who is special...

One person who is specialist at programming and solving problems with a computer Project Description: Potential computer, hardware, programming and software genius, I look

Padovan sequence, write a program to generate padovan sequence in c++

write a program to generate padovan sequence in c++

Define the processing of a structure, Define the Processing of a Structure?...

Define the Processing of a Structure? The members of structure are typically processed individually as separate entities. So we must be able to access the individual structure

Function, limitation of function

limitation of function

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

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Expression in c++, expression and its types with example programs

expression and its types with example programs

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