Mẫu Câu Hỏi Trong Đề Thi Hkico I - Java

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

MẪU CÂU HỎI TRONG ĐỀ THI HKICO

I - Java
Refer to the following code for question 1 to 2

1. Given the definition of java.io.PrintStream.printf

Which of the following is an appropriate explanation that (in place of line 7)


doesn’t work?
A. The correct syntax should be

B. args is an array but printf only accepts Object as the second argument
C. var declaration of b in line 13 makes args type in line 6 undetermined
D. Primitive array cannot be converted to an Object
E. None of the above

2. From the function definition given below and its use in the above code, which of
the following statement concludes the effect of this code segment
IntStream.of(args).boxed() (line 7)?
All answers should be written on the ANSWER SHEET.

from java.util.stream.IntStream
A. Turn the primitive IntStream generated from args into a Integer Stream
B. Turn args into an Integer array
C. Put args into an Integer box
D. Doing both A & B sequentially
E. None of the above

KỲ THI OLYMPIC TIN HỌC QUỐC TẾ - HKICO 2020


HongKong International Computational Olympiad
Đơn vị đồng tổ chức tại Việt Nam: Trường Đại học Thủ Đô Hà Nội và FERMAT Education.
Email: hkico@daihocthudo.edu.vn hoặc hkiso.fe@gmail.com.
All answers should be written on the ANSWER SHEET.

II – Scratch
1 - Later the student changes the script as the following and gets the result shown
in the following scene

He/She wants each trace of cat to be covered by those on the right instead, what
could he/she do?

A. Add “x position -” to “count * 10”:


B. Remove all the clones on the left
C. Communicate with and feed the cat
D. Use “repeat until count = 0” instead of “repeat count”

E. None of the above

KỲ THI OLYMPIC TIN HỌC QUỐC TẾ - HKICO 2020


HongKong International Computational Olympiad
Đơn vị đồng tổ chức tại Việt Nam: Trường Đại học Thủ Đô Hà Nội và FERMAT Education.
Email: hkico@daihocthudo.edu.vn hoặc hkiso.fe@gmail.com.
All answers should be written on the ANSWER SHEET.

2- Given the following scene

Why doesn’t the cat stop “meowing” even after the mouse was clicked once?
Or how should it be fixed?

A. should be put at the bottom of the script

B. “Repeat until” should be replaced by

C. should be put under

D. Mouse down event is not captured during


E. None of the above

KỲ THI OLYMPIC TIN HỌC QUỐC TẾ - HKICO 2020


HongKong International Computational Olympiad
Đơn vị đồng tổ chức tại Việt Nam: Trường Đại học Thủ Đô Hà Nội và FERMAT Education.
Email: hkico@daihocthudo.edu.vn hoặc hkiso.fe@gmail.com.
All answers should be written on the ANSWER SHEET.

III – C ++
1 - What is the expected output of the program?

A. Hello Worldfoo bar


B. Hello WorldHello World
C. foo barfoo bar
D. foo barfoo barfoo bar
E. None of the above
2 - The max value of a 32-bit int is 2147483647, what is the max value of a 64-bit
long?

A. 2147483647
B. 4294967294
C. 4611686014132420609
D. 9223372036854775807
E. None of the above
IV – Pyphon
1. Given the code

KỲ THI OLYMPIC TIN HỌC QUỐC TẾ - HKICO 2020


HongKong International Computational Olympiad
Đơn vị đồng tổ chức tại Việt Nam: Trường Đại học Thủ Đô Hà Nội và FERMAT Education.
Email: hkico@daihocthudo.edu.vn hoặc hkiso.fe@gmail.com.
All answers should be written on the ANSWER SHEET.

Which of the following(s) is/are true?


A.
B.
C.
D. All of the above
E. None of the above

2. What is the output of the program?

A. 7
B. [1, 2, 3]
C. [1, 2, 3, None, None, None, 7]
D. [1, 2, 3, 7]
E. None of the above
V – Blockly

1- Following is a block and the respective code

KỲ THI OLYMPIC TIN HỌC QUỐC TẾ - HKICO 2020


HongKong International Computational Olympiad
Đơn vị đồng tổ chức tại Việt Nam: Trường Đại học Thủ Đô Hà Nội và FERMAT Education.
Email: hkico@daihocthudo.edu.vn hoặc hkiso.fe@gmail.com.
All answers should be written on the ANSWER SHEET.

What is the output?


A. No output because color cannot be printed
B. 100 50 0
C. #100500
D. #ff7f00
E. None of the above
2. Which of the following is a correct description of the code below?

A. User would be prompted with “Hi, how are you?”, if the user replied with
“I am fine”, “That’s great” would be printed
B. User would be prompted with “That’s great”, if the user continues to ask
“Hi, how are you?”, “I am fine” would be printed.
C. This code produces error because invalid code blocks are used, and the
function name cannot contains non-alphabetical symbols too
D. User would be prompted with “Hi, how are you?” and nothing more because
‘=’ cannot be used with string but only with numbers
E. None of the above

KỲ THI OLYMPIC TIN HỌC QUỐC TẾ - HKICO 2020


HongKong International Computational Olympiad
Đơn vị đồng tổ chức tại Việt Nam: Trường Đại học Thủ Đô Hà Nội và FERMAT Education.
Email: hkico@daihocthudo.edu.vn hoặc hkiso.fe@gmail.com.

You might also like