Dev-C++ Basics

Submitted by: Submitted by

Views: 208

Words: 2602

Pages: 11

Category: Science and Technology

Date Submitted: 02/26/2013 05:59 AM

Report This Essay

DEV-C++ Data Types

Boolean- Variables of this type can only take two values- 1 and 0. In C++ these correspond to true and false and can be used interchangeably. In C++ bool variables can only use true and false, they are not interchangeable with 1 and 0.

Character- A character is a type of variable that holds a character in C and C++. On Win 32, unless explicitly defined as Unicode, a char is 8 bits, which is the same size as a byte.

Integer- Integer is a fundamental (i.e. built into the compiler) type used to define numeric variables holding whole numbers.

Floating point- Float is short for floating point and is a fundamental (i.e. built into the compiler)type used to define numbers with fractional parts. The float type can represent values ranging from approximately 1.5 × 10−45 to 3.4 × 1038with a precision of 7 digits.

Double floating point- Double floating point is a computer number format that occupies two adjacent storage locations in computer memory. A double number, sometimes simply called a double, may be defined to be an integer, fixed point, or floating point 

Valueless- no value

Wide character- A wide character is a computer character data type that generally has a size greater than the traditional 8-bit character. The increased data type size allows for the use of larger coded character sets.

DEV-C++ Control String

The C-Style Character String:

The C-style character string originated within the C language and continues to be supported within C++. This string is actually a one-dimensional array of characters which is terminated by a nullcharacter '\0'. Thus a null-terminated string contains the characters that comprise the string followed by a null.

The following declaration and initialization create a string consisting of the word "Hello". To hold the null character at the end of the array, the size of the character array containing the string is one more than the number of characters in the word "Hello."...