Tuesday, 28 January 2020

Beginning of OOP Language

0 comments

Beginning of OOP Language


? C++ language is made up of letters, words, sentences and constructs just like English
language.
? A collection of characters, much like a word in English language are called tokens.
? A token can be a keyword, or identifier, constant, string or an operator.
? Keywords are the reserve words that cannot be used as names of variable or other user defined
program elements.
? Identifiers refer to the names of variables, functions, arrays, classes etc. created by the
programmer, Basic types.
? An array represents named list of finite number of similar data elements. A function is a
named part of a program that can be invoked from the other parts of the program.
? A pointer is a variable that holds a memory address of another variable. A reference is an
alternative name for an object. A constant is a data item whose data value can never
change during the program run.
? Operators are the symbols that represent specific operations. Arithmetic operators are
unary +, Unary–, +, –, *, / and % . ‘%’ uses pure integer division thereby requires integer
operands.
? Comparison operators, also called relational operators, compare the relationships among
values. The order of evaluation among logical operators is NOT, AND, OR, i.e.!, &&, 11.
? Along with mallo(), calloc() and frec() functions, C++ also defines two unary operators,
new and delete, that perform the task of allocating and freeing the memory.


Character Constant: One or more characters enclosed in single quotes.
Expression: A combination of variables, constants and operators written according to some
rules.
Identifies: The names of variables, functions, arrays, classes, etc. created by the programmer.
Explicitly reserved identifiers that cannot be used as names for the program variables
or other user defined program elements.
Operands: The data items that operators acted upon all called operands.
Scope Resolution Operator: This operator enables a program to access a global variable when a
local variable of the same name is in scope.
String Constant: Sequence of characters enclosed in double quotes.
Tokens: A collections of characters, much live a word in English language. The smallest individual
unit in a program.


No comments:

Post a comment