Friday, August 13, 2010

Basic Programming C++

History of C++

Talking about C++ are usually not separated from C, as the languge of this prodecessor. C is the programming language that can be said to between low beraras language ( language that is oriented to the machine ) and high beraras language (human-oriented language). C++ was created by Bjarne Stroustrup a decade after C.

Basic Element of C++ :

1. Keyword

Keyword is the identifier that has been defined by the language C/C++ which has a specific meaning and purpose in the program. Keyword is a word reserved ( reserved word ) mean reserved and should not be used for the other purpose.

2. Identifier

Identifier are names the determined by the program makers to deliver a varable name, constanta name, function name, name labels and other objects. General rules applicable in making the identification :


It should be capitalized or underlined
The Next character can be letters, numbers or underscores
The uper-case letters are considered different from the small
The lenght of the identifier is not restricted, but only the first 32 characters are considered significant
May not equal with keywords.

3. Basic Data Types



Understanding the data in the program is a value that can be expressed in the form kostanta or variable.
* Constants declare a fixed value
* Variables declared value is changed sealama process of program
Data based on the type can be divided into five groups, termed as the basic data dasar.Kelima data types are:
* Int: integer states (bil.bulat).
Value range: -32 768 s / d 32 767 float: declare the real numbers (fractions) single precision (low accuracy).
*
Range of values: 3.4E-38 s / d 3.4E +38 double: declare the real numbers (fractions) precisely double (with high accuracy).
*
Range of values: 1.7E-308 s / d 1.7E +308 char: declare all ASCII character codes.
*
Range of values: -128 s / d 127 void: declared no value (blank).
*

No comments:

Post a Comment