Practice Exam 1
Questions
- Exam Paper
- Click on GitHub Link to accept, run
get-pe01
andsubmit-pe01
to solve this like any other assignments.
Basic Info
- Date: 6 October, 2018 (Saturday)
- Time: 9am to 12noon
- Venue: Various programming labs
- Scope: Units 1-12, Assignments 1-2, Tutorials 1-4
4 to5 programming questions, very easy to hard- Criteria: Correctness and Style. One mark is allocated for programming style for each 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.
- You should acclimatize yourself to the use of the PC desktops in the lab assigned to you.
- 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.
- There is one mark allocated to style for each question. As long as you keep your code clean, neat, and readable, you will get this one mark, almost for free. Review the CS1010 style guide so that you know what is expected in terms of coding style.
- 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-002 |
ADELYN KOH JING YING | PL1 | soctf-imac215-003 |
AHMAD MUDAAFI' B ZAINUDDIN | PL1 | soctf-imac215-004 |
AI ZHENGWEI | PL1 | soctf-imac215-005 |
ALEX TEO KANG JIE | PL1 | soctf-imac215-008 |
AMIR AZHAR B AZIZAN | PL1 | soctf-imac215-009 |
ANDREW LAU JIA JUN | PL1 | soctf-imac215-010 |
ANG KENG SIANG | PL1 | soctf-imac215-011 |
ANG KIANG YANG | PL1 | soctf-imac215-012 |
AW CHIAN HAO | PL1 | soctf-imac215-013 |
BALAM SAI ROHIT REDDY | PL1 | soctf-imac215-014 |
BEATRICE CHAN TONG | PL1 | soctf-imac215-015 |
BENEDICT YU CHENG EN | PL1 | soctf-imac215-016 |
BENJAMIN CHIA SHAN HONG | PL1 | soctf-imac215-017 |
CAI RONG | PL1 | soctf-imac215-019 |
CHAN EE ZHENG, BENJAMIN | PL1 | soctf-imac215-020 |
CHAN HIN, SEAN | PL1 | soctf-imac215-021 |
CHAN WEI FONG, MAX | PL1 | soctf-imac215-022 |
CHAN YEE CHONG PHILIP | PL1 | soctf-imac215-023 |
CHAN YEW CHUN DANIEL | PL1 | soctf-imac215-024 |
CHAN ZHI ZHENG, AMOS | PL1 | soctf-imac215-025 |
CHANG HUI ZHEN | PL1 | soctf-imac215-026 |
CHANG ZHONG KAI | PL1 | soctf-imac215-027 |
CHEN CHAO | PL1 | soctf-imac215-028 |
CHEN TONG | PL1 | soctf-imac215-029 |
CHENG LE DA, CLEMENT | PL1 | soctf-imac215-030 |
CHENG WANYIN | PL1 | soctf-imac215-031 |
CHENG WEIXUAN | PL1 | soctf-imac215-032 |
CHERYL NG YUN LIN | PL1 | soctf-imac215-033 |
CHEW JUN KONG | PL1 | soctf-imac215-034 |
CHIA BIING HANN | PL1 | soctf-imac215-035 |
CHNG XIAN YI | WSLab 3 | ws3-002 |
CHOI WONJAE | PL1 | soctf-imac215-037 |
CHU JUI HUNG @JEFFERSON CHU | PL1 | soctf-imac215-038 |
CHUA MAI FENG, CARL | PL1 | soctf-imac215-039 |
CHUA WEN XUAN | PL1 | soctf-imac215-040 |
CHUA ZONG WEI | PL1 | soctf-imac215-043 |
CLAIRE CHAN YEN HWA | PL1 | soctf-imac215-044 |
CYNTHIA LEE WENG YAN | PL1 | soctf-imac215-045 |
DANIEL TAN WEE LIANG | PL2 | soctf-pl2-002 |
DANISH B EDDIE | PL2 | soctf-pl2-003 |
DARREN ONG | PL2 | soctf-pl2-004 |
DEBBIE TAN JIA MIN | PL2 | soctf-pl2-005 |
DING NING | PL2 | soctf-pl2-006 |
DIVAKARAN HARITHA | PL2 | soctf-pl2-007 |
EDMUND TEO WEI XIN | PL2 | soctf-pl2-009 |
EU JING SEN | PL2 | soctf-pl2-010 |
EVELYN YI-WEN CHEN | PL2 | soctf-pl2-011 |
FATIN NABILAH BTE SUHAIMI | PL2 | soctf-pl2-012 |
FOO CHI HEN | PL2 | soctf-pl2-013 |
GINA QUAH JIE XI | PL2 | soctf-pl2-014 |
GLEN WONG SHU ZE | PL2 | soctf-pl2-016 |
GOH RUI PING SAMANTHA | PL2 | soctf-pl2-017 |
GOH ZHEN HAO JOEY | PL2 | soctf-pl2-018 |
GONDHALEKAR SUKRUT YOGESH | PL2 | soctf-pl2-019 |
GREGORY TAN WEI YUAN | PL2 | soctf-pl2-020 |
GUI XIXIAN | PL2 | soctf-pl2-021 |
GUO HAOREN | PL2 | soctf-pl2-022 |
HANS KURNIA WIDJAJA | PL2 | soctf-pl2-023 |
HAO YUN | PL2 | soctf-pl2-024 |
HASHIR ZAHIR | PL2 | soctf-pl2-025 |
HENG HONG CHUAN | PL2 | soctf-pl2-026 |
HO JING YANG DANIEL | PL2 | soctf-pl2-028 |
HO SI SHI ANNETTE | PL2 | soctf-pl2-029 |
HO WEI BIN, JERRY | PL2 | soctf-pl2-030 |
HU XINYING | PL2 | soctf-pl2-031 |
HUANG XUANKUN | PL2 | soctf-pl2-032 |
IAN CHUA | PL2 | soctf-pl2-033 |
ISABELLA CHEONG XIAO XUAN | PL2 | soctf-pl2-035 |
IVAN ANDIKA LIE | PL2 | soctf-pl2-036 |
JANEL ANG YEE HUEY | PL2 | soctf-pl2-037 |
JASON SATHYA CITRO | PL2 | soctf-pl2-038 |
JASPER ONG SHAO YONG | PL2 | soctf-pl2-039 |
JAZHTEN LOW YONGSHEN | PL2 | soctf-pl2-040 |
JERRY ZHANG ZHUORAN | PL2 | soctf-pl2-042 |
JESS TEO XI ZHI | PL2 | soctf-pl2-043 |
JOEL CHANG ZHI KAI | PL2 | soctf-pl2-044 |
JOHN CUTHBERT KHOO TENG FONG | PL2 | soctf-pl2-045 |
JOSEPH WONG YEFENG | PL2 | soctf-pl2-046 |
JUSTIN CHIA JIA JIN | PL3 | soctf-pl3-001 |
K ALAGES | PL3 | soctf-pl3-002 |
KARAN SARAT | PL3 | soctf-pl3-003 |
KARNATI SAI ABHISHEK | PL3 | soctf-pl3-005 |
KEE KAH LOK | PL3 | soctf-pl3-006 |
KEITH CHAN JUN KAI | PL3 | soctf-pl3-007 |
KELVIN HARRIS | PL3 | soctf-pl3-009 |
KEVIN PUTERA | PL3 | soctf-pl3-010 |
KEZIA KEW KAI YUN | PL3 | soctf-pl3-011 |
KHAIRUL IMAN NASRI B AZHARIE | PL3 | soctf-pl3-013 |
KHOO TZE YANG RAYSON | PL3 | soctf-pl3-014 |
KISHORE R | PL3 | soctf-pl3-015 |
KWOK KUIN EK JEREMY | PL3 | soctf-pl3-016 |
KYAWT KYAWT SAN | PL3 | soctf-pl3-017 |
LAI WEN XUAN JEREMY | PL3 | soctf-pl3-018 |
LAM TIAN WEI JUSTIN | PL3 | soctf-pl3-019 |
LE HONG LONG | PL3 | soctf-pl3-020 |
LEE HONG CHIEN, KENNETH | PL3 | soctf-pl3-021 |
LEE LI XIN | WSLab 3 | ws3-003 |
LEE RAIYAN BIN ZULKIFLI | PL3 | soctf-pl3-023 |
LEE WEI HERN, JASON | PL3 | soctf-pl3-025 |
LEE YUEYU | PL3 | soctf-pl3-026 |
LEE ZHEN YU | PL4 | soctf-pl4-002 |
LEOW YONG HENG | PL4 | soctf-pl4-003 |
LEOW YONG KANG ANDREW | PL4 | soctf-pl4-004 |
LI JIAYU | PL4 | soctf-pl4-005 |
LI ZIHAN | PL4 | soctf-pl4-006 |
LIAO LIXIN | PL4 | soctf-pl4-007 |
LIAO TIANCHANG | PL4 | soctf-pl4-008 |
LIM CHEE SENG BRIAN | PL4 | soctf-pl4-009 |
LIM CHEK JUN | PL4 | soctf-pl4-010 |
LIM CHENG YIN, RYAN | PL4 | soctf-pl4-011 |
LIM HAO XIANG, SEAN | PL4 | soctf-pl4-012 |
LIM JIA WEI | PL4 | soctf-pl4-013 |
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 | PL5 | soctf-pl5-003 |
LIU SHIRU | PL5 | soctf-pl5-004 |
LIU SONGTAO | PL5 | soctf-pl5-005 |
LIU WEI JIE NICHOLAS | PL5 | soctf-pl5-006 |
LOH CHING WEI, JOSHUA | PL5 | soctf-pl5-007 |
LOH YONG ZEE | PL5 | soctf-pl5-008 |
LOW EE TER | PL5 | soctf-pl5-009 |
LOW JIA YEE | PL5 | soctf-pl5-010 |
LOW SIU YUAN, FRANCIS | PL5 | soctf-pl5-012 |
LUCAS FOO SOO QUAN | PL5 | soctf-pl5-013 |
LYE JUN WEI ANANDA | PL5 | soctf-pl5-014 |
MARC PHUA HSIAO MENG | PL5 | soctf-pl5-015 |
MATTHEW NATHANAEL SUGIRI | PL5 | soctf-pl5-016 |
MERVIN WEE MINGWEN | PL5 | soctf-pl5-017 |
MICHELLE TOH HUI PING | PL5 | soctf-pl5-019 |
MODAK SHANTANU BHARAT | PL5 | soctf-pl5-020 |
MOHAMED RIYAS | PL5 | soctf-pl5-021 |
MOHAMMAD YOUSUF MINHAJ ZIA | PL5 | soctf-pl5-022 |
MUHAMMAD FAIRUZ B AMIRHAMZAH | PL5 | soctf-pl5-023 |
MUHAMMAD HOZEFA ZUMKHAWALA | PL6 | soctf-pl6-003 |
MUHAMMAD SHOLIHIN BIN KAMARUDIN | PL6 | soctf-pl6-004 |
MUHHAMMAD NUR HAFIDZ BIN HUSSAIN | PL6 | soctf-pl6-005 |
NATHAN YEO KEE HERN | PL6 | soctf-pl6-006 |
NEO WEN HUI | PL6 | soctf-pl6-007 |
NG JIE WU | PL6 | soctf-pl6-008 |
NG JING KANG | PL6 | soctf-pl6-009 |
NG JING KIAT | PL6 | soctf-pl6-010 |
NG SHI QI, CARRIE | PL6 | soctf-pl6-011 |
NG SIU HIAN | PL6 | soctf-pl6-012 |
NG WEE KIAT | PL6 | soctf-pl6-013 |
NG WEI JIE, BRANDON | PL6 | soctf-pl6-014 |
NG ZI HUI | PL6 | soctf-pl6-015 |
NGAN JI CHENG | PL6 | soctf-pl6-016 |
NGUYEN THANH DUC | PL6 | soctf-pl6-017 |
NGUYEN TIEN DAT | PL6 | soctf-pl6-018 |
NIGEL TAN | PL6 | soctf-pl6-019 |
NIGELLE LEO YUWEN | PL6 | soctf-pl6-020 |
NISHANTH ELANGO | PL6 | soctf-pl6-021 |
NYAN WUN PAING | PL6 | soctf-pl6-022 |
OEI CHIU YAN REBECCA | PL6 | soctf-pl6-023 |
ONG YU XUAN | PL6 | soctf-pl6-024 |
OUNG YONG SHENG KENNEDY | PL6 | soctf-pl6-025 |
OW ZHENG KUAN | PL6 | soctf-pl6-026 |
P PRADEEP | PL6 | soctf-pl6-027 |
PANG JIA JUN VERNON | PL6 | soctf-pl6-030 |
PARK SO HYUN | PL6 | soctf-pl6-031 |
PARMAR VARUN SAMIR | PL6 | soctf-pl6-032 |
PARVATHI RANJITH MENON | ESLab 1 | pc2 |
PATWARI RISHAB | ESLab 1 | pc3 |
PEI YAN BO | ESLab 1 | pc5 |
PHOON JIA JUIN | ESLab 1 | pc6 |
POH CHOO LEONG, LINSTON | ESLab 1 | pc8 |
PONG LOONG BOB | ESLab 1 | pc9 |
POON KAH ONN, BENJAMIN | ESLab 1 | pc11 |
POW JING YONG | ESLab 1 | pc12 |
QIAN JIE | ESLab 1 | pc13 |
QUAH YOU JING KANE | ESLab 1 | pc14 |
QUEK AIK PENG | ESLab 1 | pc15 |
RAGHAV BHARDWAJ | ESLab 1 | pc16 |
RAJAMOHAN B PRIYAN | ESLab 1 | pc17 |
RAVEENDRAN AJEY ASHOK | ESLab 1 | pc18 |
RISHI MAHADEVAN | ESLab 1 | pc19 |
RUSDI HAIZIM B RAHIM | ESLab 1 | pc20 |
RYAN TAN YU | ESLab 1 | pc21 |
SAI GANESH SURESH | ESLab 1 | pc22 |
SCOTT FLOYD ZHEN-YAN SMAHON | ESLab 1 | pc23 |
SEE SHENG CHAO | WSLab 2 | ws2-004 |
SENTHIL ARAAVIND | ESLab 2 | pc2 |
SHA LONG | ESLab 2 | pc3 |
SHANNON LEE | ESLab 2 | pc5 |
SHAWN WONG JUN KIT | WSLab 2 | ws2-003 |
SHRIYA SAXENA | ESLab 2 | pc8 |
SIM YU JIE | ESLab 2 | pc9 |
SITI NADIAH BINTE MOHAMED RAMLI | ESLab 2 | pc11 |
SUTHER DAVID SAMUEL | ESLab 2 | pc12 |
TALAGADADIVI DURGA RUKMINI MANASWINI | ESLab 2 | pc13 |
TAM WEI IAN JOSHUA | ESLab 2 | pc14 |
TAN GUAN YEW | ESLab 2 | pc15 |
TAN KAI LI CATHERINE | ESLab 2 | pc16 |
TAN KOK JOON | ESLab 2 | pc17 |
TAN LI ANN PETER | ESLab 2 | pc18 |
TAN YEH HAN, JOHN | ESLab 2 | pc19 |
TAN YI XIANG | ESLab 2 | pc20 |
TAN ZHENG FU JUSTIN | ESLab 2 | pc21 |
TAN ZHENG WEN | ESLab 2 | pc22 |
TAY JIN WEN | ESLab 2 | pc23 |
TAY JING XUAN | ESLab 2 | pc24 |
TAY TZE-WEI, CALEB | WSLab 1 | ws1-004 |
TAY YEE EN, RYAN | WSLab 1 | ws1-005 |
TEH ZI HUAI | WSLab 1 | ws1-006 |
TEO WEI JIE, SHAUN | WSLab 1 | ws1-007 |
TOH YING YING JANICE | WSLab 1 | ws1-008 |
TONG QI WEI | WSLab 1 | ws1-009 |
TRAN MINH DUONG | WSLab 1 | ws1-010 |
TRAN QUANG THANH | WSLab 1 | ws1-011 |
TSHIN QI REN | WSLab 1 | ws1-012 |
UMAR BIN MOIZ | WSLab 1 | ws1-013 |
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-004 |
YANG ZI YUN | WSLab 3 | ws3-005 |
YAP JIN FA | WSLab 3 | ws3-006 |
YAP KESIN | WSLab 3 | ws3-007 |
YE GUOQUAN | WSLab 3 | ws3-008 |
YE TONG | WSLab 3 | ws3-009 |
YEN PEI CHIH | WSLab 3 | ws3-010 |
YEW JING HUI | WSLab 3 | ws3-011 |
YU XIAOXUE | WSLab 3 | ws3-012 |
YUAN JIAYI | WSLab 3 | ws3-013 |
YUE JUN YI | WSLab 3 | ws3-014 |
ZHANG SHIYU | WSLab 3 | ws3-015 |
ZHANG YIHAN | WSLab 3 | ws3-016 |
ZHANG YIPING | WSLab 3 | ws3-017 |
ZHANG YUE HAN | WSLab 3 | ws3-018 |
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 |