C++ is Object oriented programing language. It was developed at AT & T Bell laboratories in the early 1980 in USA by Bjarne stroustrup. C++ derived from the C language . The most important elements added to C to create C++ are concerned with Class and Object. Since the Class was a major addition to the original C language.
C++ Character Set
Token
Constant: Constants are the fixed values that do not change during the execution of a program.
i) Integer Constant :- The numbers which has not any fractional part.
Ex : 20, -65, 256, 50 etc.
ii) Floating Point Constant :- The numbers which has integer part as well as fractional part.
Ex:- 12.5, -2.6, 0.65, 0.0 etc.
iii) Character Constant :- A character constant is a single alphabet, a single digit or a single special symbol enclosed within pair of single quotes.
Ex :- 'a', '5', '?', '#' etc.
iv) String Constant :- A string constant is a character or group (sequence) of characters enclosed within pair of double quotes.
Ex:- "a", "5", "ab", "54", "?", "Hello", "Today is Monday" etc.
v) Backslash Character Constant :- These are used in output functions.
'\a' - Alert or Alarm or Bell
'\b' - Backspace
'\f' - Form feed
'\n' - New Line
'\r' - Carriage return
'\t' - Horizontal Tab
'\v' - Vertical Tab
'\'' - Single Quote
'\"' - Double Quote
'\?' - Question Mark
'\\' - Backslash
'\0' - Null
Const: A const keyword is used to define a constant that value can not be changed.
Ex: const float pi=3.14;
Operators :- Operator is a symbol that is used to perform some mathematical and logical operations.
EX: +, -, *, /, <, > etc.
0 Comments:
Post a Comment
If you have any queries or suggestions, please let me know!