Teach Time Encyclopedia - Learn About Our World
Home Page
Teach Time
Featured Topics

United States
by state

CITYology

Academic Disciplines

Historical Timelines

Themed Timelines

Calendars

Reference Tables

Biographies

How-tos



Thursday, August 21, 2008

Declaration

A declaration is a form of statement, which expresses (or declares) some idea; declarations attempt to argue that something is true. Some types of written text are said to be declarations, such as the US Declaration of Independence.

Computer Science

In computer science, a declaration specifies a variable's dimensions, identifier, type, and other aspects. The declaration, and any related initializer, forms the definition; usually, the declaration and definition are the same thing. Definitions reserve memory. Definitions and declarations can also be used for subroutines (functions); where, they are sometimes referred to as "prototypes". Once again, in some cases the definition and the prototype are the same thing.

Initialization allows a variable to be defined as "equal" to something. Below is an example of a C++ function which declares an integer variable, x; this is followed by an example where the variable has been initialized to equal seven, x = 7:

void example1()
{
 int x;
}

void example2()
{
 int x = 7;
}


Internet Hotel Solutions

Site Sponsors
AC Units
Baltimore Harbor
Boot Camp Grads
Bra Size
Burkittsville
College Hotels
Digital Harbor
Free Cell Phones
Golden Hare Travel
Golf Vacations
Golf Courses
Gourmet
Hair Styles
Hippodrome
iWoman
Lesson Plans
Maryland Hotels
MD Genealogy
Minor League Stuff
Motel Site
Ocean City
OC Real Estate
Old Agers
Office Supplies
Orlando
Pet Friendly Hotel
Room Prices
Savannah, GA
Ski Vacations
South Baltimore
Student Teaching
Travel Sources
University Hotels
Visit Military Bases
Washington, DC

Brought to you by NoChildLeftBehind.com and the Beaches and Towns Network, LLC.