CyberChallenge.IT 2019 - Pretest
Demo of the pretest for the 2019 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

Given the following code:
What is the maximum number of characters that can be put between quotes to avoid a possible memory corruption?
1 point
Clear selection
Question 2

Given the following array:  
Which of the following expressions accesses the element of value 5, i.e., a[1][1]?
1 point
Clear selection
Question 3

The following (incomplete) implementation of the strcat standard function should concatenate the C string s2 to s1:   
What would you put in place of ??? to make it work?
1 point
Clear selection
Question 4

Consider the following function:  
Assuming that sizeof(long)==4, what would you put in place of ??? so that the function prints 20?
1 point
Clear selection
Question 5

Consider the following C function:  
What would you put in place of ??? so that the function prints flag?
1 point
Clear selection
Question 6

Consider the following function:   
What does the call f(b) do to a buffer b initialized with the string "guess"?
1 point
Clear selection
Question 7

Consider the following C function:  
Choose a value for ??? in the call f(???) so that the array v will be written outside of its boundaries. Assume that sizeof(char)==1, i.e., 8 bits wide.
1 point
Clear selection
Question 8
“If Alice does not eat pizza, then Bob does not drink beer”.
If this statement is true, which of the following is certainly true?
1 point
Clear selection
Question 9
There are three types of security experts: Cyber Defenders always say the truth, Crackers always lie, and Lamers may both say the truth or lie.
Let us suppose that in a group of four people each one says a sentence:
- Alice says: ”Bob is a Cyber Defender”
- Bob says: ”Charlie is a Lamer”
- Charlie says: ”Mallory is a Lamer”
- Mallory says: ”Alice is a Cracker”   
What is the maximum number of Cyber Defenders that you could find in this group?
1 point
Clear selection
Question 10
A herd of sharks is made of 9 sharks ordered by their size. The smaller the shark the faster it swims. Sharks eat whatever they can catch, including other, smaller sharks. However, when a shark attacks a prey it slows down a little bit. Hence the next, faster shark can attack it (bigger sharks are too slow). For instance, if the smaller shark (number 9) attacks a prey, shark number 8 (only) can decide to attack it and so on. A small, fast fish that only the smaller shark can catch passes next to the herd.  
Should the shark attack?
1 point
Clear selection
Question 11
In the woods there are three types of animals that can speak: foxes, snakes, and turtles. The first ones lie only on rainy days, the second ones always lie, the third ones always tell the truth. One day, an explorer talks with four animals. Their statements, reported in the order in which they were said, are:

(A) “Today it’s raining”;
(B) “The animal that spoke before me lies”;
(C) “Today is sunny”;
(D) “The animal, which spoke before me, lies or I am a fox”.  
How many turtles did the explorer speak to at most?
1 point
Clear selection
Question 12
A flight from Milan to New York costs $700; from Milan to Frankfurt costs $100; from Milan to London $200; from New York to Boston $100; from Frankfurt to Boston $600; from Frankfurt to New York $400; from Frankfurt to London $150; from London to Boston $450.  
What is the minimum cost for flying from Milan to Boston, regardless of the number of flights to take?
1 point
Clear selection
Question 13
Bar is 10 years old; Baz is three times older than Foo, who is younger than Bar. The sum of the age of Bar and Baz is 31.   
How old is Foo?  
1 point
Clear selection
Question 14
In the magic land of MalwareLand, there are only three types of malware samples: Foo, Boo, and Bar. Each type of malware sample can either run on Desktop or Mobile. The fraction of samples living in MalwareLand is the same for each type.  
Assuming that 1/3 of malware samples run on Windows (Desktop), 1/3 on Linux (Desktop), 1/3 on Android (Mobile), what is the probability to find a sample Boo that runs on a Desktop system?   
1 point
Clear selection
Submit
Clear form
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy