DIFFERENCE BETWEEN STRUCT AND UNION:
In structures,each member has its own storage location,whereas all memebers of a union use
the same location.this implies that,although a union may contain many members of different types,it can handle only one member at a time.
ex: struct book
{
char title[20];
char author[15];
int pages;
float price;
}
ex: union item
{
int m;
float x;
char c;
}code;
Popular Posts
-
Console Applications Console Applications are command-line oriented applications that allow us to read characters from the console, write ch...
-
Input/Output with files C++ provides the following classes to perform output and input of characters to/from files: * ofstream: Stream c...
-
5.3 Draw.aspx Web Applications I am just about to finish this tutorial. I have given you a couple of code samples to chew on, but t...
-
Advantages of MS Access MS Access is a light weight database managements system. Also, it provides it's own designer so that you can gen...
-
5.1 The .NET Framework: Big Picture Figure 5‑1 The .NET Framework in Context Looking at Figure 5‑1 we see the lifespan of managed c...
-
4.3 Using the FCL “Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.” The IO strea...
-
Simple Binding Generating DataSet To generate a DataSet, select Data->Generate DataSet from the main menu. From the dialog that opens, as...
-
Data Adapter Configuration Wizard In this section we will create our own data adapter, a built-in feature that comes with Visual Basic .NET ...
-
Conditional Statements If....Else statement If conditional expression is one of the most useful control structures which allows us to execut...
-
Classes (I) A class is an expanded concept of a data structure: instead of holding only data, it can hold both data and functions. An object...
No comments:
Post a Comment