Professional Documents
Culture Documents
7.Whati
sanar r
ay?Menti
onthedisadvant
agesofanar
ray.
Anarr
ayisacoll
ect
ionofel
ementsofsamedatat
yperef
err
edbyasi
ngl
ename.
Di
sadvant
age:
Ar rayi sstatics t
ructure.
Wemustknowi nadvancet hathowmanyel ementsaretobest or
edinar
ray.
Si ncear rayi soff i
xedsi ze,ifweal l
ocatemor ememor ythanrequi
rement
thent hememor yspacewi l
lbewast ed.
8.Definesear ching.Nameanyonemet hodf orsearching.
Iti
sthepr ocessofl ocat i
ngt heposi t
ionofsomeel ementinthearray.
Li
nearsear chmet hod,Bi narysear chmet hod
9.Definesor t
ing.Nameanyonemet hodofsor t
ing.
Thepr ocessofar rangingel ement seitherinascendi ngordescendingorderi
s
cal
leds orti
ng.
Bubbles ortorIns erti
ons or
torQui cks ort
,Mer ges ort
,sel
ect
ions or
t,heapsor
t
10.
Whati sinserti
onanddel eti
onoper ati
ononar rays?
Addinganewel ementi ntothear rayiscalledinsertion
Removinganel ementf rom t hear r
ayi scall
eddel etion
11.Whatismeantbyfuncti
onover
loadi
ng?
Funct
ionover
loadi
ngisaconceptwher
eapr
ogr
am canhavet
woormor
efunct
ions
1
witht
hesamename,wi t
hdiff
erentnumberofargument
sanddat
atypeof
argument
s.(signatur
eofthefuncti
on)
.
Functi
onover
loadingisanexampleofpolymorphi
sm.
12.
Def
ineinl
inefunct
ion.Menti
ononeadvant
age.
I
tisaspecialmemberfunct
ionwhosef
unct
ioncal
li
srepl
acedbyf
unct
ionbody.
Advantages
● I
nli
nefunct i
onincr
easest hespeedofex ecut
ion*
● Thereadabili
tyoft
hepr ogr am i
ncreas
es*
● Veryeffi
cientcodecanbegener ated.
● Theinl
inememberf uncti
onsar ecompactfuncti
oncal
l
s,t
her
ebyt
hesi
ze
oft
heobj ectcodeiscons iderabl
yreduced.
13.Whati sconst r
uct or?Ment i
ont ypes.
Aconst r
uct orisaspeci al memberf unct
ionthati saut omat i
cal
lyinvokedwhenan
objectiscr eatedandi susedt oini
ti
ali
zetheobj ectsofacl assautomat i
call
y.
Ithassamenameast hatoft heclass.
Ther earet hreet ypesofconst ruct
ors,namely:
1. De faultcons t
ructor
2. Pa ramet erizedcons tructor
3. Copyc ons tructor
14.Whati scopyconst r
uctor ?
Copyconst ructori sapar amet erizedconstr
uctorusi ngwhi choneobj ectcanbe
copiedt oanot herobj ect.
15.Givedi ffer
encebet weendef aultandpar ameterizedconst r
uct or.
Def aultconst r
uct or Paramet erizedconst ructor
Aconst r
uct orwhi chdoesn’ taccept Aconst ructorwhi chaccept s
anyar gument si scalledadef ault argument si scalledapar amet eri
zed
const r
uctor . const ructor.
Itcannotbeover loaded Itcanbeover loaded.
Allobjectsar ei ni
tial
izedt osamesetofDi ff
er entobj ectscanbei nit
ial
i
zedt o
values. diff
erentval ues.
16.
Whati
sinher
it
ance?Ment
ionanyonet
ypeofi
nher
it
ance.
I
tist
hepr
ocessofder
ivi
nganewcl
assf
rom t
heexi
sti
ngcl
ass.
OrI
tisacqui
ri
ngt
hepr
oper
ti
esofonecl
asst
oanot
hercl
ass.
Typesofi
nher
it
ance
Si
ngl
elevel
inher
it
ance
Mul
ti
l
evel
Mul
ti
ple
Hi
erar
chi
cal
Hybr
id
17.
Whatisapointer
?Ment i
onadvantages.
Point
erisavari
ablewhi chst
orestheaddressofanot
hervar
iabl
e.
Advantages:
Pr operuti
l
izati
onofmemor y
Dynami callocati
onanddeal l
ocat
ionofmemor y
2
Easytodealwi
thhardwarecomponents
Iti
spossi
blet
owrit
eeffi
cientpr
ograms.
Establ
i
shescommunicati
onbetweenpr ogr
am anddat
a
18.
Whati
stheuseof*and&oper atorswit
hrespecttopoi
nter
s.
*i
spoi
nteroper
ator
.i
tuset
odecl
areapoi
nterand i
tret
urnst
heval
ueoft
hevar
iabl
e,
&i saddressoperat
or.I
tret
urnsmemor yaddressofvar
iabl
e.
19.
WhatisSQL?Ment iononeSQLpackage.
SQLst
andsf orStr
uct
uredQuer yLanguage.Languageusedtocommuni
cat
ewi
thRDBMS.
Or
acl
e,Sybase,Mi
crosof
tSQLSer
ver
,Acces
s
20. Whati
sprimar
ykey?
Anat
tr
ibut
eorSetofat
tr
ibut
eswhi
chuni
quel
yident
if
yeachr
ecor
dinat
abl
e.
21.
Ment
ionDDLcommandsusedi
nSQL.
Creat
eAlterDropaloknownas[
s CAD]
22. Dif
fer
enti
ateDROPandDELETEcommandsi nSQL
DELETE DROP
DELETEisusedt or
emovet upl
esor DROPi susedt
oremoveent i
ret
abl
e
rowsfr
om atable.
I
tisaDataManipulat
ionLanguage I
tisaDat
aDefi
nit
ionLanguage(
DDL)
(DML)command Command
<ht
ml> Def
inesanHTMLdocument
<head> Def
inesi
nfor
mat
ionaboutt
hedocument
<body> Def
inest
hedocument
’sbody
<h1
>to<h6> Def
inesHTMLheadi
ngs
<br
> I
nser
tasi
ngl
eli
nebr
eak
3
<f
ont
> The<font>tagisusedt ochanget heformatof
thet
extont hewebpage
<b> The<b>t agwillboldthetextinsidethetag.
<i
> The<i>tagwi l
li
tali
cizethetextinsi
det hetag.
<u> The<u>t agwillunderli
nethet exti
nsidethetag.
*
***
***
***
***
***
** ALLTHEBESTFOREXAMS *
***
***
***
***
***
***
*
4
5