42121121, 7:51 PM
re
(Quiz16-TestReview: Atemat review
sHoo Chinh Qui (Bachelor arogram (Eultime stuy)) Khoa Knos hoe va Ky thult Ma
1 Khoa Hon My‘Tioh /-Nij.mdn vp tinh (201009) Lo? (DH KZ)
DA bAt iu vie le
Tinh trang
Hoan thinh vio
Thai glanthye
ign
cautaid
Monday, 22 November 2021, 4:32 PM
Bhoan thanh
Monday, 22 November 2021, 5:16 PM
43 phit27 gly
9.60/10720
0.59 cia 10.00 (6%)
(cho doan chong tinh
int NSI*{1.23,5),sum=0;
fort x
Mali2==0)
i:
ose
sum
>
enn
ay ho bit git ign sum
az
ba
010
43
ct ding ts 2
inh (Faculty of Computer Sclence and Engineering)
F Chad 1S / Quizis-testRoviow
ana42121121, 7:51 PM (Quizt5-TestReview: Atomat review
cana,
(Cho doan chong tinh sau:
int ATH(1.2553.1499.)
(The Loop)
‘
rine;
)
“rong ce dp n dud day Cu 1a (The Loop) A€ doan chung tn in ra: 2519
forint 01036)
b-fortitenseto =)
¢ forint 0103422) x
4. Tt ef ce Gp dn kde tu sal
(Cu Wat ding la forfint eet)
caus
‘oho bigt két qua must ra man hinh ela dan chuong tinh sa
Intx-5y°6;
ey) print);
{x09 print;
se print(c"y):
es x
4.565
(cu td ding I: 86
‘e-leaming hemut.edu.vnimodiauizireview php ?attempt=451495 1 &cmid=726296 ana42121121, 7:51 PM (Quizt5-TestReview: Atomat review
cated
‘oan chuang rinh nto sau a8 dat due ket qué x= 1007
Bigtx dug Khai bo: int
. if39=0K
22205;
>
eisai
4.9}
100;
Wa tng ta
0
ciuraiS,
(cho cfc cf nh sar
vf
(open(input btw");
2.finstopen(inputot2),
23 fi=fopen(input xt);
CCéba0nhidu cu Hh dng 4&:m6 tp tin va cho phép thay 46i gw ct fle "putt?
a2
oa
a4
(td ding ts 3
ana42121121, 7:51 PM (Quizt5-TestReview: Atomat review
cara
(cho doan ma sau
oid swaptin “ant “BX
void maint
int a5 b-7
swap(Gaeb):
)
Cid toa. a va b sau ki thy ign chung tin in aot?
2. Chucng tinh
bs7
e585
ans x
(cut ding I 5,7,
cuni7
‘6 Kal béo mot ham vold matixPlus nn vo 4 bign gm 2 mang nguyen 2 chiBu va 286 nguyen row, co kal bo nit sau day ding?
2 void matrxPlusint Alf0o}nt BU 09}in ro
i cob;
» int matrxPtus(nt Af100] 100} 81 G0[10o}nt ro int co
Plusint Ant in row int co)
in matrixPls(ntA(1OOIYOOLit BLNOOIf COhint ro int oy
old
(Cau td dng: vold matixPtus(iot AL OO}nt BI 1OOLint ow, nt eo);
‘e-leaming hemut.edu.vnimodiauizireview php ?attempt=451495 1 &cmid=726296 ana42121121, 7:51 PM
cx nein
‘Doan nh nao sau day 1?
char
print 3
print e
lot,
seanf(%d 8a),
dohare;
printf")
(au td Bt ding la: char
print"
cand
irs a9neua ge
‘oho biét ld tx sau Goan chong tinh:
exes 927
forint i=xieyinei
xy,
)
as
None of the other anewers are right
ea
ae
(cu 8 br ding 18
(Quiz16-TestReview: Atemat review
sna42121121, 7:51 PM
cauraTO
(Cho bit gid trib sau doan chung ins
a4
b.28
«Infinite Loop.
an
(cau td dung: 214
eats
‘im a90.oa 930
(che doan chung vin
char AL
seanf('%s'A):
nt)
[Néu git trban phim nhgp viola "Hello Worle thi doan chong inh 8?
2. Bao Ib
in Hello Work
etna
in Hello”
(cau a bt ding ln "Helo™
(Quiz16-TestReview: Atemat review
ana42121121, 7:51 PM (Quizt5-TestReview: Atomat review
caunarT2
cx nein
(ho ki Hau
struct officers,
char nameli00};
Intage;
Ine department
>
6 hal bo va gin git cho mt bn kgu officers due Kha béo nh trén oan m& no sau day a ng?
2. officers be(Tran Thanh 87302);
». suet officers
dname="Posigat D
age=28;
depariments5;
6. struct ofcersa-(Tran Van 28.3)
4. officers c=(’Nguyen Dong C7
age=25;
cedepartmentss
(cut ding li: strut officers Tran Van #2823;
caunarT
Kal bdo nto dui dy la hon 1?
28, double double;
bint const
int Sy
4, double eal-sumber x
(ctr ding
ouble double;
7442121121, 7:51 PM
caunaiT4
Cid tea «vay sau Khithye hi dogn ma sau lagi?
intx=50,
re
ad
xsi,
None ofthe other answers are right
x50, ys51
4.350, y50
(au td ding: None ofthe other answers are right
cana TS
nim on cin 050
‘oho chung tinh:
vot sain(yt
fee ety
sede
fore 1! Sout prfnte(ae 8);
fave 2: S002) printed "73))
Ge 2 ESD peeteese “Th:
?
iy fn chinh xe phn duge in rat dogn chuong in nay
Tra lt
(cau Wd bt ding la: 248
(Quiz16-TestReview: Atemat review
ana42121121, 7:51 PM (Quizt5-TestReview: Atomat review
cara T6
xd en ci
(cho ham
Int Hint xint ok
xe=0)retun x:
return x+y
return xs)
>
ay co bit git tr v8 Kh go (9.2;
Ted lt x
(cut dng ls 24
canst
(cho chuong tint:
‘inetuce «erao.ns
void nein
‘itt (tntsynaatoc(s0¥stzef(int)).to03
AteisAtoF 1s
mascara
apenas;
primer "089:
:
’
Hay dfn chinh de phn duge in rat dogn chuong tin nay
Ted x
(ct Br ding 49 1419.26.29 9499
ona42121121, 7:51 PM (Quizt5-TestReview: Atomat review
cana T8
kd ncn.
(ho ki He
‘ypedet struct Points
double xy,
Points;
Hy ding duy nh 1 cu enh 48 khal bdo métbign Athude ki6u de Hfu wen 06 x18 1 5 vayla 25:
Tra lt x
(cau td ding la: struct Poims Ax(.52.5);
ron42121121, 7:51 PM
carat
gm 9904200
(Quiz16-TestReview: Atemat review
Viet chung tinh nhip mét s6 nguyn Ntr bn phim tinh ng ce 96 binhphurong tr dN.
ual ld tea tng nay tng ving lip ngén nhau bet Khodng tring"
For example:
‘Test. Input Result
‘Answer: (penalty regime: 0,0, 10,20, ..®)
¥ [Pineludecetdio.n>
2 |eincludesconio.h>
4 fine main
sc
6] ia
7] tone §
a] soe
of 4-3
20 | privet (nmap
ar] Beane", anys
2
BY] wea & »
wd ¢
a soseark
16 fos
v
1 44 = 8", 195
» \atong 462 6 202 4 oe. «dh? Tas
2
2] reine as
a2] ine sua;
23
mae", ny 895
Syntax Eons)
_tester_ci2:91 (tal errors conto. No such Me om directory
Question author's solution (C):
T [ineludecstaio. he
2 -fsoe maine
3)[ ine ay sunca;
4 | seantC naan;
sof Fortine Seisdeonsaenye
6 sume=115
7 printe("Ré "sums
s| oo
9 | return 95
ae [>
im cho bai nép nay 00/200,
‘e-learning hemut edu vnimodiauiziteview phpattempt=4514351 Bcmi
5298
nna42121121, 7:51 PM (Quizt5-TestReview: Atomat review
aura 20
im 090200
(Cho chuong tinh sau:
Hinclade
‘include
‘ypedef struct _Characters{
int;
‘char NamelS0
double stragiiuk
Yoharacters;
‘void Input(Characters*charLst nt *numCharint numinputt
‘mi STUDENT ANSWER
)
void printest(Characters*char stint numChar)n ttbute}
‘MV STUDENT ANSWER
)
‘void printList(Characters ¢charistint numChar
‘MI STUDENT ANSWER
>
Int malng
Characters charList{S00}
Int mamenar=0;
Input(chartistanumchar);
printestcharListumchar1),
Drintest(charListrumchar2)
printestcharListrumchar3),
PrintList(charistnumchar):
)
Sioh vign ods thin 3 him
Input0 4 thém vo dank sich Nurinput nn vt tr bn phim. V6lmBi nha vt thém vo mamChar cng thém 1
PrintBest 6 ina 1D va tn nan vit man hdtv mat ch 8 ndo dé vA 11 st, 2 ag, 3 Tak
PrintList) in ra todn bg thong tin va ch 86 cla ede nn vat tang List dang e.
For example:
Tost Input Result
Tnpue(enarListSnunchar2); 401 Peter | 10:103 nane:Peter
printf (“10:84 nanecRe Stroklf AGE RLF 5.55.7 sers5.s00@00
Lkstie\o"charList(@)-10,charList{@).NaneycharList{@].strycharList(@).api,enarList{@)-1uk): 4.3 | agt5. 766860
print¢(*RD:84 Nanests Strokl? Aah X1F 12 Aloe ki
Letaee" charts
(oarList{a]-NanecharList{a].steycharList{a].ogi,charList[2]-luk); 4.5 6.7 | 10:162 nane:Alex
309 winny agts6. 700000
vane42121121, 7:51 PM (Quizt5-TestReview: Atomot review
Test Input Result
Tape (enor. ist Suc
prantbest(charcist,nunchar, 1): ss5i7
Se 4361 Peter | Ib:105 Nove:Prine
103 wtnty
aa
opzopus
Answer: (penalty rege: 0,0, 10,20, ..®)
Reset answer
i ]oid Input(characters *charList, ine *nunchar,int muntnput)(
2
3 [ass1assrstumenr answer
aly
5
GJuoid printoest (characters charList, int nugchar, {nt attributey(
7
8 [ysriritistooe aasucr
ofp
18
a1 void printList (characters *charList,int nunchar){
a3 |ssisirsistooenr mosner
a |p
Test Input Expected Got
1 | tnpurcehartist,anunenar,2): sex oter—TO:0 me
princi("Ib:86 Nane:ts Servelt api okle oterNowecPeter— Strs0.t
Luctlen"charList{@] 1D, charList{6] Aane,charList{0].stecharList{@].agi,charList{0) 204); 5.5 5.7 strss.S6e008 Agi-0.e
rine ("IDsKa Rano:as Seosxi
Luecaten
tl 43 agts5. 700008 Lu: 8.€
sevarist(1]10,charList[1].None,charList{2} stecharcist[1]agiseharList(2}.108); 182 ako 4. 3000008 10:8 me
ntex roe strum
45 6.7 Nanecklex—Ags8.€
30 Agi. 700000
ootonus
‘e-leaming hemut.edu.vnimodiauizireview php 7attempt=451495 1 &cmid=726296 13442121121, 7:51 PM (Quizt8-TestReview: Atomat reviow
Some hidden test cases fled too.
Yur code must pae ll ests fo earn any marks, Try aga.
Show diferences
Question author's solution (C):
s]oid Input (Characters “charList, int “runchar, int nurlnput)(
24] fontine d9sicmuntrpuesie+){
3 ‘scant (*Ra\n"ScharLse[smumchar] 10);
4 Sean¢(*%s",charList[ nunchar'].Nane)
5 sean CRLF eharList [*nunchar]. 0);
é seanf(°RLF° enarLise [Snunchar] 2g);
7 seanfRLF" eharList #nunchar]} 108)
a Snumchars1},
o] 3
ae |)
11 fvotd printBest (Characters *charList, int nunchar, nt attribute)(
» ay
a Foo(int da1;ferunchansi+4){
as af (charList [maxi] -strcharList( i] ste)(
Fra axis;
v y
a >
wl) y
2a] else ir(ateributenn2){
a foo(int Lat; Seruncharsiee){
21 sf(charList [maxi] -agiccharList[].36i)(
Bos
Copyright 2007-2021 Trung Dai Hoc Bach Khoa - DHQG Tp.HM. All Rights Reserved.
‘ia chi: Nna A1-268 Ly Thudng Kiet, Phung 14, Quan 10, Tp.HCM,
Email: eleaming@hemut.edu.vn
Phat trién cya trén hé thong Moodle
Chuyta ti.
(Qui2'6-TestReview (copy) »
vane