Skip to content

Practice Exam 2

Questions

Basic Info

  • Date: 10 November, 2018 (Saturday)
  • Time: 1pm to 4pm
  • Venue: Various programming labs
  • Scope: Units 1-24, Assignments 1-7, Tutorials 1-9
  • 5 programming questions, very easy to hard
  • Criteria: Correctness, Style, Documentation, Efficient. Allocation differs per question.
  • Duration: 2 hours and 30 minutes
  • Open Book (You can bring analog references)

Lab Allocation

  • Every student is assigned to a programming lab.
  • Please see the allocation below.
  • Special access has been given to students assigned to ES Lab 1 and 2 (Embedded System Teaching Lab 1 and 2)
  • Here are the locatons for the respective labs

Special Restrictions

  • You will be issued a special account on the PE day to solve the exam questions.

  • There will be no Internet access.

Vim Configuration

Your default account will have the same .vimrc as ~cs1010/.vimrc on the CS1010 PE hosts.

You are free to edit this during the practical exams.

You, however, will not be able to download nor install vim plugins.

General Advice

  • Save your program regularly. We will use setup every account with ~/.vimrc copied from ~cs1010/.vimrc. Thus, you can find the last saved version of your files under ~/.backup if you accidentally deleted your code.
  • Plan your time properly. Do not spend excessive time on any task. Read through all questions and solved those that you are confident to solve first.
  • There are five questions, from very easy to very hard. Solve as many as you can. I expect most students will be able to solve 3 out of the 5 questions within the time limit.
  • Pay attention to the marking criteria, which differs from question to question.
  • Don't start typing your code right away. Think about the solution first -- what variables are needed? what is the control flow (using branches and loops)? Draw out the flowchart if it helps.
  • Break down the problem into smaller ones if the problem is too complex to solve.
  • You are not allowed to start typing on the computer for the first 10 minutes of the practical exam, or until the invigilator announced that you can do so.
  • You will be given a question form to ask questions to clarify doubts about the question paper. But note that you can only ask a boolean question (YES/NO answer).
  • Just like the assignments, you are not given all the test cases that we will be using during grading. Please test your code against additional test cases, especially for boundary cases.

Lab and Seat Allocation

NAME Venue Seat Number
AARUSHI SINGH PL1 soctf-imac215-001
AHMAD MUDAAFI' B ZAINUDDIN PL1 soctf-imac215-002
AI ZHENGWEI PL1 soctf-imac215-003
ALEX TEO KANG JIE PL1 soctf-imac215-004
AMIR AZHAR B AZIZAN PL1 soctf-imac215-005
ANDREW LAU JIA JUN PL1 soctf-imac215-006
ANG KENG SIANG PL1 soctf-imac215-007
ANG KIANG YANG PL1 soctf-imac215-008
AW CHIAN HAO PL1 soctf-imac215-009
BALAM SAI ROHIT REDDY PL1 soctf-imac215-010
BEATRICE CHAN TONG PL1 soctf-imac215-011
BENEDICT YU CHENG EN PL1 soctf-imac215-012
BENJAMIN CHIA SHAN HONG PL1 soctf-imac215-013
CAI RONG PL1 soctf-imac215-014
CHAN EE ZHENG, BENJAMIN PL1 soctf-imac215-015
CHAN HIN, SEAN PL1 soctf-imac215-016
CHAN WEI FONG, MAX PL1 soctf-imac215-017
CHAN YEE CHONG PHILIP PL1 soctf-imac215-018
CHAN YEW CHUN DANIEL PL1 soctf-imac215-019
CHAN ZHI ZHENG, AMOS PL1 soctf-imac215-020
CHANG HUI ZHEN PL1 soctf-imac215-021
CHANG ZHONG KAI PL1 soctf-imac215-022
CHEN CHAO PL1 soctf-imac215-023
CHEN TONG PL1 soctf-imac215-024
CHENG LE DA, CLEMENT PL1 soctf-imac215-025
CHENG WANYIN PL1 soctf-imac215-027
CHENG WEIXUAN PL1 soctf-imac215-028
CHERYL NG YUN LIN PL1 soctf-imac215-029
CHEW JUN KONG PL1 soctf-imac215-030
CHIA BIING HANN PL1 soctf-imac215-031
CHNG XIAN YI PL1 soctf-imac215-032
CHOI WONJAE PL1 soctf-imac215-034
CHU JUI HUNG @JEFFERSON CHU PL1 soctf-imac215-035
CHUA MAI FENG, CARL PL1 soctf-imac215-036
CHUA WEN XUAN PL1 soctf-imac215-037
CHUA ZONG WEI PL1 soctf-imac215-038
CLAIRE CHAN YEN HWA PL1 soctf-imac215-039
CYNTHIA LEE WENG YAN PL1 soctf-imac215-043
DANIEL TAN WEE LIANG PL1 soctf-imac215-044
DANISH B EDDIE PL1 soctf-imac215-045
DARREN ONG PL2 soctf-pl2-001
DEBBIE TAN JIA MIN PL2 soctf-pl2-002
DING NING PL2 soctf-pl2-003
DIVAKARAN HARITHA PL2 soctf-pl2-004
EDMUND TEO WEI XIN PL2 soctf-pl2-005
EU JING SEN PL2 soctf-pl2-006
EVELYN YI-WEN CHEN PL2 soctf-pl2-007
FATIN NABILAH BTE SUHAIMI PL2 soctf-pl2-009
FOO CHI HEN PL2 soctf-pl2-010
GINA QUAH JIE XI PL2 soctf-pl2-011
GLEN WONG SHU ZE PL2 soctf-pl2-012
GOH RUI PING SAMANTHA PL2 soctf-pl2-013
GOH ZHEN HAO JOEY PL2 soctf-pl2-014
GONDHALEKAR SUKRUT YOGESH PL2 soctf-pl2-014
GREGORY TAN WEI YUAN PL2 soctf-pl2-016
GUI XIXIAN PL2 soctf-pl2-017
GUO HAOREN PL2 soctf-pl2-018
HANS KURNIA WIDJAJA PL2 soctf-pl2-019
HAO YUN PL2 soctf-pl2-020
HASHIR ZAHIR PL2 soctf-pl2-022
HENG HONG CHUAN PL2 soctf-pl2-023
HO JING YANG DANIEL PL2 soctf-pl2-024
HO SI SHI ANNETTE PL2 soctf-pl2-025
HO WEI BIN, JERRY PL2 soctf-pl2-026
HU XINYING PL2 soctf-pl2-028
HUANG XUANKUN PL2 soctf-pl2-029
IAN CHUA PL2 soctf-pl2-030
ISABELLA CHEONG XIAO XUAN PL2 soctf-pl2-031
IVAN ANDIKA LIE PL2 soctf-pl2-032
JANEL ANG YEE HUEY PL2 soctf-pl2-035
JASON SATHYA CITRO PL2 soctf-pl2-036
JASPER ONG SHAO YONG PL2 soctf-pl2-037
JAZHTEN LOW YONGSHEN PL2 soctf-pl2-038
JERRY ZHANG ZHUORAN PL2 soctf-pl2-039
JESS TEO XI ZHI PL2 soctf-pl2-041
JOEL CHANG ZHI KAI PL2 soctf-pl2-042
JOHN CUTHBERT KHOO TENG FONG PL2 soctf-pl2-043
JOSEPH WONG YEFENG PL2 soctf-pl2-044
JUSTIN CHIA JIA JIN PL2 soctf-pl2-045
K ALAGES PL2 soctf-pl2-046
KARAN SARAT PL3 soctf-pl3-001
KARNATI SAI ABHISHEK PL3 soctf-pl3-002
KEE KAH LOK PL3 soctf-pl3-003
KEITH CHAN JUN KAI PL3 soctf-pl3-004
KELVIN HARRIS PL3 soctf-pl3-006
KEVIN PUTERA PL3 soctf-pl3-007
KEZIA KEW KAI YUN PL3 soctf-pl3-008
KHAIRUL IMAN NASRI B AZHARIE PL3 soctf-pl3-010
KHOO TZE YANG RAYSON PL3 soctf-pl3-011
KISHORE R PL3 soctf-pl3-012
KWOK KUIN EK JEREMY PL3 soctf-pl3-013
KYAWT KYAWT SAN PL3 soctf-pl3-014
LAI WEN XUAN JEREMY PL3 soctf-pl3-015
LAM TIAN WEI JUSTIN PL3 soctf-pl3-016
LE HONG LONG PL3 soctf-pl3-017
LEE HONG CHIEN, KENNETH PL3 soctf-pl3-018
LEE LI XIN PL3 soctf-pl3-019
LEE RAIYAN BIN ZULKIFLI PL3 soctf-pl3-020
LEE WEI HERN, JASON PL3 soctf-pl3-021
LEE YUEYU PL3 soctf-pl3-022
LEE ZHEN YU PL3 soctf-pl3-025
LEOW YONG HENG PL3 soctf-pl3-026
LEOW YONG KANG ANDREW PL4 soctf-pl4-001
LI JIAYU PL4 soctf-pl4-002
LI ZIHAN PL4 soctf-pl4-003
LIAO LIXIN PL4 soctf-pl4-004
LIAO TIANCHANG PL4 soctf-pl4-006
LIM CHEE SENG BRIAN PL4 soctf-pl4-007
LIM CHEK JUN PL4 soctf-pl4-008
LIM CHENG YIN, RYAN PL4 soctf-pl4-010
LIM HAO XIANG, SEAN PL4 soctf-pl4-011
LIM JIA WEI PL4 soctf-pl4-012
LIM JIAYI, TAMELLY PL4 soctf-pl4-014
LIM JUN KUANG, LIONEL PL4 soctf-pl4-015
LIM LI LINCOLN PL4 soctf-pl4-016
LIM SI YING PL4 soctf-pl4-017
LIM TING WEI PL4 soctf-pl4-018
LIM WEN HAN, EUGENE PL4 soctf-pl4-019
LIM YAN TING PL4 soctf-pl4-020
LIN JIAYUE PL4 soctf-pl4-021
LING WEN JIAN PL4 soctf-pl4-022
LIU JINGXUAN PL4 soctf-pl4-023
LIU PEIZE PL4 soctf-pl4-024
LIU SHIRU PL4 soctf-pl4-025
LIU SONGTAO PL5 soctf-pl5-001
LIU WEI JIE NICHOLAS PL5 soctf-pl5-002
LOH CHING WEI, JOSHUA PL5 soctf-pl5-003
LOH YONG ZEE PL5 soctf-pl5-004
LOW EE TER PL5 soctf-pl5-005
LOW JIA YEE PL5 soctf-pl5-006
LOW SIU YUAN, FRANCIS PL5 soctf-pl5-007
LUCAS FOO SOO QUAN PL5 soctf-pl5-008
LYE JUN WEI ANANDA PL5 soctf-pl5-009
MARC PHUA HSIAO MENG PL5 soctf-pl5-010
MATTHEW NATHANAEL SUGIRI PL5 soctf-pl5-011
MERVIN WEE MINGWEN PL5 soctf-pl5-013
MICHELLE TOH HUI PING PL5 soctf-pl5-014
MODAK SHANTANU BHARAT PL5 soctf-pl5-015
MOHAMED RIYAS PL5 soctf-pl5-016
MOHAMMAD YOUSUF MINHAJ ZIA PL5 soctf-pl5-017
MUHAMMAD FAIRUZ B AMIRHAMZAH PL5 soctf-pl5-018
MUHAMMAD HOZEFA ZUMKHAWALA PL5 soctf-pl5-019
MUHAMMAD SHOLIHIN BIN KAMARUDIN PL5 soctf-pl5-020
MUHHAMMAD NUR HAFIDZ BIN HUSSAIN PL5 soctf-pl5-021
NATHAN YEO KEE HERN PL5 soctf-pl5-022
NEO WEN HUI PL5 soctf-pl5-023
NG JIE WU WSLab 2 ws2-001
NG JING KANG WSLab 2 ws2-002
NG JING KIAT WSLab 2 ws2-003
NG SHI QI, CARRIE WSLab 2 ws2-004
NG SIU HIAN WSLab 2 ws2-005
NG WEE KIAT WSLab 2 ws2-006
NG WEI JIE, BRANDON WSLab 2 ws2-008
NG ZI HUI WSLab 2 ws2-009
NGAN JI CHENG WSLab 2 ws2-010
NGUYEN THANH DUC WSLab 2 ws2-011
NGUYEN TIEN DAT WSLab 2 ws2-012
NIGEL TAN WSLab 2 ws2-014
NIGELLE LEO YUWEN WSLab 2 ws2-015
NISHANTH ELANGO WSLab 2 ws2-016
NYAN WUN PAING WSLab 2 ws2-017
OEI CHIU YAN REBECCA WSLab 2 ws2-019
ONG YU XUAN WSLab 2 ws2-020
OUNG YONG SHENG KENNEDY WSLab 2 ws2-021
OW ZHENG KUAN WSLab 2 ws2-022
P PRADEEP WSLab 2 ws2-023
PANG JIA JUN VERNON WSLab 2 ws2-024
PARK SO HYUN ESLab 2 pc1
PARMAR VARUN SAMIR ESLab 1 pc1
PARVATHI RANJITH MENON ESLab 1 pc2
PATWARI RISHAB ESLab 1 pc3
PEI YAN BO ESLab 1 pc4
PHOON JIA JUIN ESLab 1 pc5
POH CHOO LEONG, LINSTON ESLab 1 pc6
PONG LOONG BOB ESLab 1 pc7
POON KAH ONN, BENJAMIN ESLab 1 pc8
POW JING YONG ESLab 1 pc9
QIAN JIE ESLab 1 pc10
QUAH YOU JING KANE ESLab 1 pc11
QUEK AIK PENG ESLab 1 pc12
RAGHAV BHARDWAJ ESLab 1 pc13
RAJAMOHAN B PRIYAN ESLab 1 pc14
RAVEENDRAN AJEY ASHOK ESLab 1 pc15
RISHI MAHADEVAN ESLab 1 pc16
RUSDI HAIZIM B RAHIM ESLab 1 pc17
RYAN TAN YU ESLab 1 pc18
SAI GANESH SURESH ESLab 1 pc19
SCOTT FLOYD ZHEN-YAN SMAHON ESLab 1 pc20
SEE SHENG CHAO ESLab 1 pc21
SENTHIL ARAAVIND ESLab 2 pc2
SHA LONG ESLab 2 pc3
SHANNON LEE ESLab 2 pc4
SHAWN WONG JUN KIT ESLab 2 pc5
SHRIYA SAXENA ESLab 2 pc6
SIM YU JIE ESLab 2 pc7
SITI NADIAH BINTE MOHAMED RAMLI ESLab 2 pc8
SUTHER DAVID SAMUEL ESLab 2 pc9
TALAGADADIVI DURGA RUKMINI MANASWINI ESLab 2 pc10
TAM WEI IAN JOSHUA ESLab 2 pc11
TAN GUAN YEW ESLab 2 pc12
TAN KAI LI CATHERINE ESLab 2 pc13
TAN KOK JOON ESLab 2 pc14
TAN LI ANN PETER ESLab 2 pc15
TAN YEH HAN, JOHN ESLab 2 pc16
TAN YI XIANG ESLab 2 pc17
TAN ZHENG FU JUSTIN ESLab 2 pc18
TAN ZHENG WEN ESLab 2 pc19
TAY JIN WEN ESLab 2 pc20
TAY JING XUAN ESLab 2 pc21
TAY TZE-WEI, CALEB WSLab 1 ws1-001
TAY YEE EN, RYAN WSLab 1 ws1-002
TEH ZI HUAI WSLab 1 ws1-003
TEO WEI JIE, SHAUN WSLab 1 ws1-004
TOH YING YING JANICE WSLab 1 ws1-005
TONG QI WEI WSLab 1 ws1-006
TRAN MINH DUONG WSLab 1 ws1-008
TRAN QUANG THANH WSLab 1 ws1-009
TSHIN QI REN WSLab 1 ws1-010
UMAR BIN MOIZ WSLab 1 ws1-011
VASAVADA TEJAS SUDHIR WSLab 1 ws1-014
VIDHYABHARATHI SOMASUNDARAM WSLab 1 ws1-015
VIVIAN LEE BOON GEOK WSLab 1 ws1-016
WANG ZICONG WSLab 1 ws1-017
WEI FENG WSLab 1 ws1-018
WENG KEXIN WSLab 1 ws1-019
WONG JIN EN, SHANNON WSLab 1 ws1-020
WONG REN-WEI, RYAN WSLab 1 ws1-021
XUE ZHENGQING WSLab 1 ws1-022
YANG AN QI WSLab 1 ws1-023
YANG CHENGLONG WSLab 1 ws1-024
YANG KAI ZE WSLab 3 ws3-001
YANG ZI YUN WSLab 3 ws3-002
YAP JIN FA WSLab 3 ws3-003
YAP KESIN WSLab 3 ws3-004
YE GUOQUAN WSLab 3 ws3-005
YE TONG WSLab 3 ws3-006
YEN PEI CHIH WSLab 3 ws3-008
YEW JING HUI WSLab 3 ws3-009
YU XIAOXUE WSLab 3 ws3-010
YUAN JIAYI WSLab 3 ws3-011
YUE JUN YI WSLab 3 ws3-012
ZHANG SHIYU WSLab 3 ws3-014
ZHANG YIHAN WSLab 3 ws3-015
ZHANG YIPING WSLab 3 ws3-016
ZHANG YUE HAN WSLab 3 ws3-017
ZHAO PENGFEI WSLab 3 ws3-019
ZHAO TIANQI WSLab 3 ws3-020
ZHENG KAINING WSLab 3 ws3-021
ZHU BO WSLab 3 ws3-022
ZHU YIJIE WSLab 3 ws3-023
ZOE WONG XIN LEI WSLab 3 ws3-024