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
-
Defined data types (typedef) C++ allows the definition of our own types based on other existing data types. We can do this using the keyword...
-
* Install software as described in Software needed for the lab above. * Once you installed J2SE SDK, please check if it is installe...
-
Learning about Parameters (Continue) Look at the first line of the Command Button's KeyDown Event: Private Sub Command1_KeyDown(KeyCode ...
-
What Is Visual Basic and Why do I need it? Visual Basic is Easy to learn Programming language. With Visual Basic you can develop Windows bas...
-
The page directive lets you define one or more of the following case-sensitive attributes: * import="package.class" or import=...
-
JSP pages are high level extension of servlet and it enable the developers to embed java code in html pages. JSP files are finally compiled ...
-
Input/Output with files C++ provides the following classes to perform output and input of characters to/from files: * ofstream: Stream c...
-
SQL Server Express is a free, easy to use, redistributable version of SQL Server 2005 designed for building simple data-driven applications....
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>Using JavaServer Pages...
-
Preprocessor directives Preprocessor directives are lines included in the code of our programs that are not program statements but directive...
No comments:
Post a Comment