Lecture notes on


Syntax: delete pointer-variable



Download 232,82 Kb.
bet12/45
Sana07.07.2022
Hajmi232,82 Kb.
#755880
1   ...   8   9   10   11   12   13   14   15   ...   45
Bog'liq
285 OOPS lecture notes Complete-конвертирован

Syntax: delete pointer-variable;


Example:

delete p; delete q;







form of delete.
If we want to free a dynamically allocated array ,we must use the following


delete [size] pointer-variable; or

delete [ ] pointer variable;





MANIPULATERS:




Manipulators are operator that are used to format the data display. The most commonly manipulators are endl and setw.
The endl manipulator, when used in an output statement, causes a line feed to be insert.(just like \n)

Example:
cout<<”m=”<
If we assume the values of the variables as 2597,14 and 175 respectively m=2597; n=14;
p=175
It was want to print all nos in right justified way use setw which specify a common field width for all the nos.


Example: cout<cout<

LECTURE-10


CONTROL STRUCTURES:

Like c,c++, supports all the basic control structures and implements them various control statements.




The if statement:


The if statement is impklemented in two forms:





  1. simple if statement




  1. if… else statement



Simple if statement:


if (condition)


{


Action;

}


If.. else statement




If (condition) Statment1 Else Statement2

Download 232,82 Kb.

Do'stlaringiz bilan baham:
1   ...   8   9   10   11   12   13   14   15   ...   45




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish