CyberChallenge.IT 2017 - Test
Demo of the test for the 2017 edition of CyberChallenge.IT

Additional material for other tests is available at the link https://cyberchallenge.it/training
Sign in to Google to save your progress. Learn more
Question 1

Consider the following incomplete code fragment. It declares the type of the nodes of a linked list and defines a function del_key such that del_key(&l,k) removes all the nodes that contain key k from the list pointed to by l:
What would you put in place of ??? to make it work?
1 point
Clear selection
Question 2

A possible way to speed up a function that checks whether two arrays of char contain the same values is to unroll the loop and perform the comparisons by looking at the data as if they were of a wider primitive type, hence requiring fewer loop iterations.  
What would you put in place of ??? in the function below to achieve this goal?
1 point
Clear selection
Question 3

Consider the following C authentication fragment:  
What value should ?? be so that the program prints “access granted”?
1 point
Clear selection
Question 4

Obfuscation is a common technique in computer security and software engineering to conceal the semantics of a program for protecting intellectual property or making the code less vulnerable to hacker attacks.
The function above computes a function much simpler than it appears:
1 point
Clear selection
Question 5

You are given this simple dynamically-sized array implementation:  
Unfortunately, there’s a serious bug: in which function?  
1 point
Clear selection
Question 6

Consider the following code fragment.

Assumptions:
- 32-bit little-endian platform
- sizeof(char) == 1
- sizeof(unsigned) == 4  
How would you initialize (i.e., replace ??? above) BB so as to get the output “Say my name”? Just recall that the decimal ASCII code of the space is 32.
1 point
Clear selection
Question 7
In his last trip around Central Italy, Barry filled the gas tank to the top, a total of 40 liters. He traveled at 60 km/h across secondary roads and he knew that his car could make on average 10 km per liter. However, the moment he started, the gas tank developed a leak and 4 hours later the car stopped having run out of gas from the hole.
How many liters of gas had it lost through the leak?
1 point
Clear selection
Question 8
A deck of French playing cards includes thirteen ranks (A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K) for each of the four French suits (clubs, diamonds, hearts, spades).
What is the minimum number of cards you must take to be sure to pick at least one four-of-a-kind (i.e., four cards of the same rank)?
1 point
Clear selection
Question 9
  You have 100 kg of watermelons, and 99 percent of their weight comes from water. You let them dehydrate until they are 98 percent made of water.  
How many kilograms do they weigh now?
1 point
Clear selection
Question 10
Oliver, Sara, Shado, and Slade are all trapped in Lian Yu, an island in the middle of a crocodile infested lake. They have one crocodile repelling stick that protects only up to two swimmers. To get to safety a maximum of two swimmers can be in the water at the same time, also they have to be together to benefit from the stick and they have to swim at the pace of the slower swimmer. As the shore is too far, someone has to swim back with the stick until all four are safe on the shore. Oliver can swim the distance in 3 minutes, Sara in 7, Shado in 13, and Slade in 17.
What is the minimum time required for them to all get to safety?
1 point
Clear selection
Question 11
Four good friends visited Bruce at his manor last year for his birthday. His butler Alfred took notes on what time each of them arrived, but he forgot to write down whether it was before (AM) or after (PM) noon.

According to his notes:
- James arrived at 8:00
- Lee arrived at 9:00
- Selina arrived at 10:00
- Lucius arrived at 11:00

While Bruce recalls that:
- Selina did not visit him between Lee and Lucius
- At least one friend visited him between James and Lee
- James might have visited him before Selina or Lucius, but not before both
Which of the following options is compatible with the events as described above? (hint: there is only one feasible assignment of the AM/PM suffix to the events).
1 point
Clear selection
Question 12
Fobi govv, iye nsn bowowlob Tevsec Mkockb. Grkd sc dro cew yp kvv dro xewlobc pbyw yxo dy pybdi?
Hint: we used a substitution cipher that replaces each letter of the alphabet with another.
1 point
Clear selection
Submit
Clear form
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy