Professional Documents
Culture Documents
C++ Training File Index
C++ Training File Index
81ech CSL 3
rd
Semester 10026030S808
TARUN CHUPRA
Subm|tted 1o Subm|tted 8y
Ms oonam[eet kaur 1arun Chopra
81ech CSL 3
rd
Sem
10026030S808
C++ Training File
81ech CSL 3
rd
Semester 10026030S808
TARUN CHUPRA
SNo Lxper|ment age No kemarks S|gn
1 WA Lo slmply add Lwo numbers 1
2 WA Lo slmply subLracL Lwo
numbers
2
3 WA Lo slmply mulLlply Lwo
numbers
3
4 WA Lo slmply dlvlde Lwo
numbers
4
S WA Lo swap values uslng Lhlrd
varlable
3
6 WA Lo swap values wlLhouL
uslng Lhlrd varlable
7
7 WA Lo calculaLe clrcumference
of clrcle
9
8 WA Lo check lf Lhe year enLered
ls leap year or noL
10
9 WA Lo calculaLe greaLesL
number
12
10 WA Lo check number ls even or
odd
14
11 WA Lo check characLer ls vowel
or noL
16
12 WA Lo check number ln range
or noL
18
13 WA Lo prlnL sum of even
numbers from 1 Lo 10 uslng for
20
14 WA Lo prlnL Lable of any
number uslng for
22
1S WA Lo prlnL paLLern uslng for 24
16 WA Lo prlnL paLLern uslng for 23
C++ Training File
81ech CSL 3
rd
Semester 10026030S808
TARUN CHUPRA
17 WA Lo prlnL paLLern uslng for 26
18 WA Lo prlnL paLLern uslng for 27
19 WA Lo calculaLe Lhe cenLurles
and half cenLurles of players of
Lhe Leam
29
20 WA Lo check wheLher whlch of
Lhe enLered years ls a leap year
or noL
33
21 WA of calculaLor uslng swlLch
and dowhlle
37
22 WA Lo flnd greaLesL number
uslng goLo
40
23 WA for AddlLlon uslng funcLlon
wlLhouL reLurn Lype and wlLhouL
argumenLs
42
24 WA for AddlLlon uslng funcLlon
wlLh reLurn Lype and wlLhouL
argumenLs
43
2S WA for AddlLlon uslng funcLlon
wlLhouL reLurn wlLh argumenLs
43
26 WA for AddlLlon uslng funcLlon
wlLh reLurn wlLh argumenLs
47
27 WA Lo Swap uslng funcLlon call
by value
49
28 WA Lo Swap uslng funcLlon call
by reference
31
29 WA of Array Lo prlnL name 33
30 WA of Array Lo prlnL elemenLs
of maLrlces
34
31 WA Lo add Lo maLrlces 36
32 WA Lo add Lwo numbers uslng
funcLlon
37
33 WA Lo flnd greaLesL number
uslng funcLlon of class
39
34 WA of class wlLh array Lo enLer
Len employs daLa
61
C++ Training File
81ech CSL 3
rd
Semester 10026030S808
TARUN CHUPRA
3S WA of class wlLh slmple
lnherlLance Lo enLer and show
daLa of employs
64
36 WA of class wlLh mulLlple
lnherlLance Lo enLer and show
daLa of employs
68
37 WA of class wlLh mulLllevel
lnherlLance Lo enLer and show
daLa of employs
73
38 WA of class wlLh hlerarchlcal
lnherlLance Lo enLer and show
daLa of employs
78
39 WA of class wlLh hybrld
lnherlLance Lo enLer and show
daLa of employs
83
40 WA Lo add uslng classes wlLh
consLrucLor
89
41 WA Lo add uslng classes wlLh
desLrucLor
91
42 WA Lo flnd area uslng funcLlon
overloadlng
93
43 WA Lo flnd area uslng funcLlon
overloadlng
93
44 WA Lo overload asslgnmenL
operaLor (le)
98
4S WA Lo show Lhe use of vlrLual
funcLlon
100
46 WA Lo show Lhe use of vlrLual
class
102