INTRODUCTION
The C++ language was developed at AT&T bell laboratories in the early 1980’s by Bjarne stroustrup. He found
‘C’ lacking for simulations & decided to extend the language by adding
features from his favourite language, simula 67.
Simula 67 was one of the earliest
object oriented languages. Bjarne stroustrup called it “C with classes” originally.the name C++was coined by
Rick Mascitti where “++” is the C increment operator. Ever since its birth, C++
evoloved to cope with problems encountered by users , and through discussions
at AT&T. However, the maturation of the C++ language was attested to by
two events:
Ø The formation of an ANSI(American National
Standard Institute) C++ committee &
Ø The publications of the Annotated C++ Refrence
Manual by Ellis & Stroustrup.
The latest C++ standards document was issued by ANSI/ISO in year 2011 namely
C++11 or formally C++0x.
The major reason behind the success & popularity of C++ is
that it supports the object oriented technology . the latest in the software
development & the most near to the real world.
The C++ language has two main components : a direct mapping
of hardware features provided primarily by the C subset, and zero-overhead
abstractions based on those mappings. Stroustrup describes C++ as "a
light-weight abstraction programming language [designed] for building and using
efficient and elegant abstractions".
C++ character sets
A character set is a set of valid
characters that a language can recognise. A character represents any letter,
digit, or any other sign. C++ has the following character set :
Letters
:A-Z,a-z
Digits
:0-9
Special Symbols :space
+ - * / ^ \ () [] {} = =! < > . ‘ “ $ , ; : % ! & ? _ # <= >= @
White spaces :blank
space.horizontal tab carriage return, newline, form feed.
Other Characters :C++
can process any of the 256 ASCII characters as data
or literals.
THE ASCII CHARACTER SET
Character data is
represented in a computer by using standardized numeric codes which have been
developed. The most widely accepted code is called the American Standard Code for Information Interchange ( ASCII). The ASCII code associates an integer value for each symbol in
the character set, such as letters, digits, punctuation marks, special
characters, and control characters. Some implementations use other codes for
representing characters, but we will use ASCII since it is the most widely
used. Of course, the internal machine representation of characters is in
equivalent binary form.
The
ASCII table has
128 characters, with values from 0 through 127. Thus, 7 bits are sufficient to
represent a character in ASCII; however, most computers typically reserve 1
byte, (8 bits), for an ASCII character.
One byte allows a numeric range from 0 through 255 which leaves room for growth
in the size of the character set, or for a sign bit. Consequently, a character
data type may optionally represent signed values; however, for now, we will
assume that character data types are unsigned, i.e. positive integer values, in
the range 0-127.It must be emphasized that a digit symbol is a character type. Digit characters have code values that differ from their numeric equivalents: the code value of '0' is 48, that of '1' is 49, that of '2' is 50, and so forth. The table shows that the character with code value 0 is a control character, '136@, called the NULL character. Do NOT confuse it with the digit symbol '0'. Remember, a digit character and the equivalent number have different representations.
0 comments:
Post a Comment