SlideShare a Scribd company logo
EXPRESSION
Chap 3
1By:-Gourav Kottawar
Contents
3.1 Tokens, Keywords, Identifiers & Constants,
3.2 Basic Data Types, User-Defined Data Types,
3.3 Symbolic Constant, Type Compatibility,
3.4 Reference Variables, Operator in C++,
3.5 Scope Resolution Operator,
3.6 Member De-referencing Operators,
3.7 Memory Management Operators,
3.8 Manipulators, Type Cast Operator
2
By:-Gourav Kottawar
Structure of C++ Program
3
By:-Gourav Kottawar
Tokens
The smallest individual units in a program are
known as tokens.
C++ has the following tokens :
Keywords
Identifiers
Strings
operators
4
By:-Gourav Kottawar
Keywords
5
By:-Gourav Kottawar
Identifiers and Constants
6
By:-Gourav Kottawar
3.2 Basic Data Types, User-Defined Data Types,
 Primitive Built-in Types
Type Keyword
Boolean bool
Character char
Integer int
Floating point float
Double floating point double
Valueless void
Wide character wchar_t
7
By:-Gourav Kottawar
 Several of the basic types can be modified
using one or more of these type modifiers:
 signed
 unsigned
 short
 long
8
By:-Gourav Kottawar
Type Typical Bit Width Typical Range
char 1byte -127 to 127
unsigned char 1byte 0 to 255
signed char 1byte -128 to 127
int 2bytes -32768 to 32767
unsigned int 2bytes 0 to 65,535
signed int 2bytes -32768 to 32767
short int 2bytes -32768 to 32767
unsigned short
int
2 byte 0 to 65,535
signed short int 2 byte -32768 to 32767
long int 4bytes
-2,147,483,647 to
2,147,483,647
signed long int 4bytes same as long int
unsigned long
int
4bytes 0 to 4,294,967,295
float 4bytes +/- 3.4e +/- 38 (~7 digits)
double 8bytes +/- 1.7e +/- 308 (~15 digits)
long double 8bytes +/- 1.7e +/- 308 (~15 digits)
wchar_t 2 or 4 bytes 1 wide character
9 By:-Gourav Kottawar
#include <iostream>
using namespace std;
int main()
{
cout << "Size of char : " << sizeof(char) << endl;
cout << "Size of int : " << sizeof(int) << endl;
cout << "Size of short int : " << sizeof(short int) << endl;
cout << "Size of long int : " << sizeof(long int) << endl;
cout << "Size of float : " << sizeof(float) << endl;
cout << "Size of double : " << sizeof(double) << endl;
cout << "Size of wchar_t : " << sizeof(wchar_t) << endl; return 0;
}
10
By:-Gourav Kottawar
typedef Declarations:
 You can create a new name for an existing
type using typedef.
 Syntax : typedef type newname;
For example, the following tells the compiler that feet is another name
for int:
typedef int feet;
Now, the following declaration is perfectly legal
and creates an integer variable called
distance:
feet distance;
11
By:-Gourav Kottawar
Enumerated Types:
 An enumerated type declares an optional type
name and a set of zero or more identifiers that
can be used as values of the type. Each
enumerator is a constant whose type is the
enumeration.
 Syntax - enum enum-name { list of names }
var-list;
 Ex- enum color { red, green, blue } c;
c = blue;
enum color { red, green=5, blue };
12
By:-Gourav Kottawar
3.4 Reference Variables
 A reference variable is an alias, that is, another
name for an already existing variable.
 Once a reference is initialized with a variable,
either the variable name or the reference
name may be used to refer to the variable.
 Creating References in C++:
int i = 17;
We can declare reference variables for i as
follows.
int& r = i;
13
By:-Gourav Kottawar
#include <iostream>
using namespace std;
int main ()
{ // declare simple variables
int i;
double d;
// declare reference variables
int& r = i;
double& s = d;
i = 5;
cout << "Value of i : " << i << endl;
cout << "Value of i reference : " << r << endl;
d = 11.7;
cout << "Value of d : " << d << endl;
cout << "Value of d reference : " << s << endl;
return 0; }
14 By:-Gourav Kottawar
Operators in C++
 All c operators are valid in c++.
 <<
 >>
 :: Scope resolution operator
 ::* Pointer to member declarator
 ->*Pointer to member operator
 .* Pointer to member operator
 delete
 endl
 new
 setw
15
By:-Gourav Kottawar
Memory Management Operator
new
Pointer_variable = new data-type;
Ex- p = new int;
int *p= new int;
We can also initialize the memory
using the new operator
Pointer_variable = new data-
type(value);
Ex- int *p=new int (25);
16
By:-Gourav Kottawar
Memory Management Operator
One dimensional array
Pointer_variable = new data-type[size];
int *p=new int[10];
Multidimensional array
array_ptr = new int[3][5][4];
array_ptr = new int[m][5][4];
17
By:-Gourav Kottawar
Memory Management Operator
 delete
delete destroyed to release the memory space
for reuse.
delete pointer_variable;
Ex - delete p;
Free a dynamically allocated array
delete [size] pointer_variable;
Ex- delete []p;
18
By:-Gourav Kottawar
Memory Management Operator
 Advantages of new operator
1. It automatically computes size of the data
object. No need of sizeof.
2. It automatically returns the correct pointer
type, no need to use type cast.
3. It is possible to initialize the object while
creating the memory space.
4. new , delete can be overloaded.
19
By:-Gourav Kottawar
Manipulators
 Input manipulators
 Output manipulators
 Parameterized manipulators
20
By:-Gourav Kottawar
Typecast operators
 Syntax
Typename (expression)
Avg= sum/float (i);
21
By:-Gourav Kottawar
Special assignment expression
 Chained assignment
X=(y=0);
Or
X=y=0;
 Embedded assignment
X=(y=50)+10
22
By:-Gourav Kottawar
Control structure
 Simple if statement
 if.....else statement
 switch statement
 do….while
 while
 for
23
By:-Gourav Kottawar

More Related Content

What's hot (20)

PPT
14 operator overloading
Docent Education
 
PPTX
Operator Overloading
Dustin Chase
 
PDF
Chapter 7 - Input Output Statements in C++
Deepak Singh
 
PDF
Operator overloading
Pranali Chaudhari
 
PPTX
operator overloading & type conversion in cpp over view || c++
gourav kottawar
 
DOCX
18 dec pointers and scope resolution operator
SAFFI Ud Din Ahmad
 
PPTX
Learning C++ - Functions in C++ 3
Ali Aminian
 
PPT
Function overloading(C++)
Ritika Sharma
 
PPT
Input and output in C++
Nilesh Dalvi
 
PPT
Operator overloading
abhay singh
 
PPT
C++ overloading
sanya6900
 
PDF
Functions in C++
Pranali Chaudhari
 
PPTX
Compile time polymorphism
ForwardBlog Enewzletter
 
PPTX
Operator overloading
ramya marichamy
 
PPTX
Function overloading
Sudeshna Biswas
 
PPTX
#OOP_D_ITS - 5th - C++ Oop Operator Overloading
Hadziq Fabroyir
 
PPTX
Bca 2nd sem u-4 operator overloading
Rai University
 
PDF
Operator_Overloaing_Type_Conversion_OOPC(C++)
Yaksh Jethva
 
PDF
Operator overloading in C++
Ilio Catallo
 
PPT
Operator Overloading
Nilesh Dalvi
 
14 operator overloading
Docent Education
 
Operator Overloading
Dustin Chase
 
Chapter 7 - Input Output Statements in C++
Deepak Singh
 
Operator overloading
Pranali Chaudhari
 
operator overloading & type conversion in cpp over view || c++
gourav kottawar
 
18 dec pointers and scope resolution operator
SAFFI Ud Din Ahmad
 
Learning C++ - Functions in C++ 3
Ali Aminian
 
Function overloading(C++)
Ritika Sharma
 
Input and output in C++
Nilesh Dalvi
 
Operator overloading
abhay singh
 
C++ overloading
sanya6900
 
Functions in C++
Pranali Chaudhari
 
Compile time polymorphism
ForwardBlog Enewzletter
 
Operator overloading
ramya marichamy
 
Function overloading
Sudeshna Biswas
 
#OOP_D_ITS - 5th - C++ Oop Operator Overloading
Hadziq Fabroyir
 
Bca 2nd sem u-4 operator overloading
Rai University
 
Operator_Overloaing_Type_Conversion_OOPC(C++)
Yaksh Jethva
 
Operator overloading in C++
Ilio Catallo
 
Operator Overloading
Nilesh Dalvi
 

Viewers also liked (20)

DOCX
Skincerity Nightly Breathable Masque
Nies Alice
 
DOC
PRAKASH RESUME_BE MECH_8 YEARS EXP_July15.
Prakash P
 
PPT
Outdoor Media Advertising
NextBee Media
 
PDF
Entrada 3 (equipo) Matemática
Gerson Ames
 
DOC
Mercado monetario
VICTOR HUGO QUISPE CABRERA
 
PDF
Know Your Supplier - Rubber & Tyre Machinery World May 2016 Special
Rubber & Tyre Machinery World
 
PPS
Women
esotericinfo
 
PDF
Brand manual Brand manual di Anna Orlandi per esame corso Grahic Design
NAD Nuova Accademia del Design
 
PPTX
basics of c++
gourav kottawar
 
PDF
Presentazione progetto rondinella pdf per esame corso Interior design di NAD
NAD Nuova Accademia del Design
 
PPTX
classes & objects in cpp
gourav kottawar
 
PDF
Dell supply chain group
FPT Univesity
 
PDF
Sesion 3
CONASIN PERU
 
PDF
Sesión 4
CONASIN PERU
 
PPT
ToleranceStackup
Winson Mao
 
PDF
Kit de Evaluación Entrada-Secundaria.
Marly Rodriguez
 
PPTX
Somos uno celebracion ibe callao 2016
IBE Callao
 
PPT
Mediawijsheid in de bredewijkschool
Johanthonia
 
Skincerity Nightly Breathable Masque
Nies Alice
 
PRAKASH RESUME_BE MECH_8 YEARS EXP_July15.
Prakash P
 
Outdoor Media Advertising
NextBee Media
 
Entrada 3 (equipo) Matemática
Gerson Ames
 
Mercado monetario
VICTOR HUGO QUISPE CABRERA
 
Know Your Supplier - Rubber & Tyre Machinery World May 2016 Special
Rubber & Tyre Machinery World
 
Brand manual Brand manual di Anna Orlandi per esame corso Grahic Design
NAD Nuova Accademia del Design
 
basics of c++
gourav kottawar
 
Presentazione progetto rondinella pdf per esame corso Interior design di NAD
NAD Nuova Accademia del Design
 
classes & objects in cpp
gourav kottawar
 
Dell supply chain group
FPT Univesity
 
Sesion 3
CONASIN PERU
 
Sesión 4
CONASIN PERU
 
ToleranceStackup
Winson Mao
 
Kit de Evaluación Entrada-Secundaria.
Marly Rodriguez
 
Somos uno celebracion ibe callao 2016
IBE Callao
 
Mediawijsheid in de bredewijkschool
Johanthonia
 
Ad

Similar to expression in cpp (20)

PDF
Introduction to C++
Pranali Chaudhari
 
PPT
Key Concepts of C++ computer language.ppt
AjayLobo1
 
PDF
Data types, operators and control structures unit-2.pdf
gurpreetk8199
 
PPT
Cpp tokens (2)
Kamlesh Makvana
 
PPTX
C++ theory
Shyam Khant
 
PPTX
OOPS (object oriented programming) unit 1
AnamikaDhoundiyal
 
PDF
Object Oriented Programming Short Notes for Preperation of Exams
MuhammadTalha436
 
PDF
Introduction of C++ By Pawan Thakur
Govt. P.G. College Dharamshala
 
DOC
Data type
Isha Aggarwal
 
PPT
Object Oriented Technologies
Umesh Nikam
 
PDF
BASIC C++ PROGRAMMING
gufranresearcher
 
PPTX
Object Oriented Programming with C++
Rokonuzzaman Rony
 
PPT
C++ tutorials
Divyanshu Dubey
 
PPTX
C_plus_plus
Ralph Weber
 
PPT
Chapter02-S11.ppt
GhulamHussain638563
 
PDF
Object Oriented Programming (OOP) using C++ - Lecture 1
Faculty of Computers and Informatics, Suez Canal University, Ismailia, Egypt
 
PPT
Chapter 2 Introduction to C++
GhulamHussain142878
 
PPTX
Chapter 2.datatypes and operators
Jasleen Kaur (Chandigarh University)
 
Introduction to C++
Pranali Chaudhari
 
Key Concepts of C++ computer language.ppt
AjayLobo1
 
Data types, operators and control structures unit-2.pdf
gurpreetk8199
 
Cpp tokens (2)
Kamlesh Makvana
 
C++ theory
Shyam Khant
 
OOPS (object oriented programming) unit 1
AnamikaDhoundiyal
 
Object Oriented Programming Short Notes for Preperation of Exams
MuhammadTalha436
 
Introduction of C++ By Pawan Thakur
Govt. P.G. College Dharamshala
 
Data type
Isha Aggarwal
 
Object Oriented Technologies
Umesh Nikam
 
BASIC C++ PROGRAMMING
gufranresearcher
 
Object Oriented Programming with C++
Rokonuzzaman Rony
 
C++ tutorials
Divyanshu Dubey
 
C_plus_plus
Ralph Weber
 
Chapter02-S11.ppt
GhulamHussain638563
 
Object Oriented Programming (OOP) using C++ - Lecture 1
Faculty of Computers and Informatics, Suez Canal University, Ismailia, Egypt
 
Chapter 2 Introduction to C++
GhulamHussain142878
 
Chapter 2.datatypes and operators
Jasleen Kaur (Chandigarh University)
 
Ad

More from gourav kottawar (20)

PPTX
operator overloading & type conversion in cpp
gourav kottawar
 
PPTX
constructor & destructor in cpp
gourav kottawar
 
PPTX
basics of c++
gourav kottawar
 
PPT
working file handling in cpp overview
gourav kottawar
 
PPT
pointers, virtual functions and polymorphisms in c++ || in cpp
gourav kottawar
 
PPTX
exception handling in cpp
gourav kottawar
 
PPTX
classes & objects in cpp overview
gourav kottawar
 
PPTX
expression in cpp
gourav kottawar
 
PPT
SQL || overview and detailed information about Sql
gourav kottawar
 
PPT
SQL querys in detail || Sql query slides
gourav kottawar
 
PPT
Rrelational algebra in dbms overview
gourav kottawar
 
PPT
overview of database concept
gourav kottawar
 
PPT
Relational Model in dbms & sql database
gourav kottawar
 
PPTX
DBMS information in detail || Dbms (lab) ppt
gourav kottawar
 
PPTX
security and privacy in dbms and in sql database
gourav kottawar
 
PPT
The system development life cycle (SDLC)
gourav kottawar
 
PPT
Software documentation
gourav kottawar
 
PPT
Software reengineering
gourav kottawar
 
PPTX
Organizational behaviour
gourav kottawar
 
PPTX
Maintenance
gourav kottawar
 
operator overloading & type conversion in cpp
gourav kottawar
 
constructor & destructor in cpp
gourav kottawar
 
basics of c++
gourav kottawar
 
working file handling in cpp overview
gourav kottawar
 
pointers, virtual functions and polymorphisms in c++ || in cpp
gourav kottawar
 
exception handling in cpp
gourav kottawar
 
classes & objects in cpp overview
gourav kottawar
 
expression in cpp
gourav kottawar
 
SQL || overview and detailed information about Sql
gourav kottawar
 
SQL querys in detail || Sql query slides
gourav kottawar
 
Rrelational algebra in dbms overview
gourav kottawar
 
overview of database concept
gourav kottawar
 
Relational Model in dbms & sql database
gourav kottawar
 
DBMS information in detail || Dbms (lab) ppt
gourav kottawar
 
security and privacy in dbms and in sql database
gourav kottawar
 
The system development life cycle (SDLC)
gourav kottawar
 
Software documentation
gourav kottawar
 
Software reengineering
gourav kottawar
 
Organizational behaviour
gourav kottawar
 
Maintenance
gourav kottawar
 

Recently uploaded (20)

PDF
I3PM Industry Case Study Siemens on Strategic and Value-Oriented IP Management
MIPLM
 
PDF
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
PPTX
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
PDF
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
 
PDF
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
PDF
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
PPTX
MATH 8 QUARTER 1 WEEK 1 LESSON 2 PRESENTATION
JohnGuillerNestalBah1
 
PDF
AI-assisted IP-Design lecture from the MIPLM 2025
MIPLM
 
PPTX
How to Add a Custom Button in Odoo 18 POS Screen
Celine George
 
PPTX
How to Create & Manage Stages in Odoo 18 Helpdesk
Celine George
 
PDF
Nanotechnology and Functional Foods Effective Delivery of Bioactive Ingredien...
rmswlwcxai8321
 
PDF
Our Guide to the July 2025 USPS® Rate Change
Postal Advocate Inc.
 
PDF
WATERSHED MANAGEMENT CASE STUDIES - ULUGURU MOUNTAINS AND ARVARI RIVERpdf
Ar.Asna
 
PPTX
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
PDF
IMPORTANT GUIDELINES FOR M.Sc.ZOOLOGY DISSERTATION
raviralanaresh2
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PPTX
The Gift of the Magi by O Henry-A Story of True Love, Sacrifice, and Selfless...
Beena E S
 
PPTX
PLANNING A HOSPITAL AND NURSING UNIT.pptx
PRADEEP ABOTHU
 
PPTX
grade 8 week 2 ict.pptx. matatag grade 7
VanessaTaberlo
 
DOCX
Lesson 1 - Nature and Inquiry of Research
marvinnbustamante1
 
I3PM Industry Case Study Siemens on Strategic and Value-Oriented IP Management
MIPLM
 
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
 
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
MATH 8 QUARTER 1 WEEK 1 LESSON 2 PRESENTATION
JohnGuillerNestalBah1
 
AI-assisted IP-Design lecture from the MIPLM 2025
MIPLM
 
How to Add a Custom Button in Odoo 18 POS Screen
Celine George
 
How to Create & Manage Stages in Odoo 18 Helpdesk
Celine George
 
Nanotechnology and Functional Foods Effective Delivery of Bioactive Ingredien...
rmswlwcxai8321
 
Our Guide to the July 2025 USPS® Rate Change
Postal Advocate Inc.
 
WATERSHED MANAGEMENT CASE STUDIES - ULUGURU MOUNTAINS AND ARVARI RIVERpdf
Ar.Asna
 
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
IMPORTANT GUIDELINES FOR M.Sc.ZOOLOGY DISSERTATION
raviralanaresh2
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
The Gift of the Magi by O Henry-A Story of True Love, Sacrifice, and Selfless...
Beena E S
 
PLANNING A HOSPITAL AND NURSING UNIT.pptx
PRADEEP ABOTHU
 
grade 8 week 2 ict.pptx. matatag grade 7
VanessaTaberlo
 
Lesson 1 - Nature and Inquiry of Research
marvinnbustamante1
 

expression in cpp

  • 2. Contents 3.1 Tokens, Keywords, Identifiers & Constants, 3.2 Basic Data Types, User-Defined Data Types, 3.3 Symbolic Constant, Type Compatibility, 3.4 Reference Variables, Operator in C++, 3.5 Scope Resolution Operator, 3.6 Member De-referencing Operators, 3.7 Memory Management Operators, 3.8 Manipulators, Type Cast Operator 2 By:-Gourav Kottawar
  • 3. Structure of C++ Program 3 By:-Gourav Kottawar
  • 4. Tokens The smallest individual units in a program are known as tokens. C++ has the following tokens : Keywords Identifiers Strings operators 4 By:-Gourav Kottawar
  • 7. 3.2 Basic Data Types, User-Defined Data Types,  Primitive Built-in Types Type Keyword Boolean bool Character char Integer int Floating point float Double floating point double Valueless void Wide character wchar_t 7 By:-Gourav Kottawar
  • 8.  Several of the basic types can be modified using one or more of these type modifiers:  signed  unsigned  short  long 8 By:-Gourav Kottawar
  • 9. Type Typical Bit Width Typical Range char 1byte -127 to 127 unsigned char 1byte 0 to 255 signed char 1byte -128 to 127 int 2bytes -32768 to 32767 unsigned int 2bytes 0 to 65,535 signed int 2bytes -32768 to 32767 short int 2bytes -32768 to 32767 unsigned short int 2 byte 0 to 65,535 signed short int 2 byte -32768 to 32767 long int 4bytes -2,147,483,647 to 2,147,483,647 signed long int 4bytes same as long int unsigned long int 4bytes 0 to 4,294,967,295 float 4bytes +/- 3.4e +/- 38 (~7 digits) double 8bytes +/- 1.7e +/- 308 (~15 digits) long double 8bytes +/- 1.7e +/- 308 (~15 digits) wchar_t 2 or 4 bytes 1 wide character 9 By:-Gourav Kottawar
  • 10. #include <iostream> using namespace std; int main() { cout << "Size of char : " << sizeof(char) << endl; cout << "Size of int : " << sizeof(int) << endl; cout << "Size of short int : " << sizeof(short int) << endl; cout << "Size of long int : " << sizeof(long int) << endl; cout << "Size of float : " << sizeof(float) << endl; cout << "Size of double : " << sizeof(double) << endl; cout << "Size of wchar_t : " << sizeof(wchar_t) << endl; return 0; } 10 By:-Gourav Kottawar
  • 11. typedef Declarations:  You can create a new name for an existing type using typedef.  Syntax : typedef type newname; For example, the following tells the compiler that feet is another name for int: typedef int feet; Now, the following declaration is perfectly legal and creates an integer variable called distance: feet distance; 11 By:-Gourav Kottawar
  • 12. Enumerated Types:  An enumerated type declares an optional type name and a set of zero or more identifiers that can be used as values of the type. Each enumerator is a constant whose type is the enumeration.  Syntax - enum enum-name { list of names } var-list;  Ex- enum color { red, green, blue } c; c = blue; enum color { red, green=5, blue }; 12 By:-Gourav Kottawar
  • 13. 3.4 Reference Variables  A reference variable is an alias, that is, another name for an already existing variable.  Once a reference is initialized with a variable, either the variable name or the reference name may be used to refer to the variable.  Creating References in C++: int i = 17; We can declare reference variables for i as follows. int& r = i; 13 By:-Gourav Kottawar
  • 14. #include <iostream> using namespace std; int main () { // declare simple variables int i; double d; // declare reference variables int& r = i; double& s = d; i = 5; cout << "Value of i : " << i << endl; cout << "Value of i reference : " << r << endl; d = 11.7; cout << "Value of d : " << d << endl; cout << "Value of d reference : " << s << endl; return 0; } 14 By:-Gourav Kottawar
  • 15. Operators in C++  All c operators are valid in c++.  <<  >>  :: Scope resolution operator  ::* Pointer to member declarator  ->*Pointer to member operator  .* Pointer to member operator  delete  endl  new  setw 15 By:-Gourav Kottawar
  • 16. Memory Management Operator new Pointer_variable = new data-type; Ex- p = new int; int *p= new int; We can also initialize the memory using the new operator Pointer_variable = new data- type(value); Ex- int *p=new int (25); 16 By:-Gourav Kottawar
  • 17. Memory Management Operator One dimensional array Pointer_variable = new data-type[size]; int *p=new int[10]; Multidimensional array array_ptr = new int[3][5][4]; array_ptr = new int[m][5][4]; 17 By:-Gourav Kottawar
  • 18. Memory Management Operator  delete delete destroyed to release the memory space for reuse. delete pointer_variable; Ex - delete p; Free a dynamically allocated array delete [size] pointer_variable; Ex- delete []p; 18 By:-Gourav Kottawar
  • 19. Memory Management Operator  Advantages of new operator 1. It automatically computes size of the data object. No need of sizeof. 2. It automatically returns the correct pointer type, no need to use type cast. 3. It is possible to initialize the object while creating the memory space. 4. new , delete can be overloaded. 19 By:-Gourav Kottawar
  • 20. Manipulators  Input manipulators  Output manipulators  Parameterized manipulators 20 By:-Gourav Kottawar
  • 21. Typecast operators  Syntax Typename (expression) Avg= sum/float (i); 21 By:-Gourav Kottawar
  • 22. Special assignment expression  Chained assignment X=(y=0); Or X=y=0;  Embedded assignment X=(y=50)+10 22 By:-Gourav Kottawar
  • 23. Control structure  Simple if statement  if.....else statement  switch statement  do….while  while  for 23 By:-Gourav Kottawar