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

Function search is supposed to return 1 if x belongs to an ordered array v of size n, and 0 otherwise:
What would you put in place of ...?
1 point
Clear selection
Question 2
What does int (*x[10])(); mean in C?
1 point
Clear selection
Question 3

Consider the following function:
What does this C function do?

Assume that sizeof(int) is 4.
1 point
Clear selection
Question 4

Consider the following C function:  
Which of the following is correct?  
1 point
Clear selection
Question 5
Let int x, y be two integers that represent Boolean values (zero means false, and a non-zero value means true).  
How would you check in C that x is true if and only if y is true?
1 point
Clear selection
Question 6

During a recruitment interview, you are asked to write your own version of the standard strlen function:
Would you put in place of ...?
1 point
Clear selection
Question 7
Consider the two C expressions x & 255 and x % 256.
Which of the following is correct?
1 point
Clear selection
Question 8
Let y be a double in C and let x = (long)(y + 0.5).
Which of the following is correct?
1 point
Clear selection
Question 9

Consider the following two C functions:
Which of the following is correct?
1 point
Clear selection
Question 10

The following function is supposed to compute the sum of all even numbers up to n if n is even, and the sum of all odd numbers up to n if n is odd:   
Which of the following is correct?
1 point
Clear selection
Question 11
If you write down all the numbers from 300 to 400, how many times do you have to write the digit 3?
1 point
Clear selection
Question 12
There are 27 tennis balls. 26 of them have the same weight and the twenty-seventh is a bit heavier.
In the worst case scenario, what is the minimum number of weighings you need to identify the heavy one by using a two-pan balance scale?
1 point
Clear selection
Question 13
Pedro is a contestant on a “Deal or No Deal” game, and he’s given the choice of three boxes: inside one box is a one million prize, while the others are empty. He picks a box, say No. 1, and the host, who knows what’s inside the boxes, opens another box, say No. 3, which is empty. He then asks him, ”Do you want to pick box No. 2 instead?”
Is it to his advantage to switch his choice?
1 point
Clear selection
Question 14
A director wishes to know how many times their movie has been shown in a given theater. The theater’s staff provides the following info:
- at the first projection there’s just 1 viewer;
- at each projection, the number of viewers grows by 1 compared to the previous one;
- 820 tickets are sold over all the projections.
How many projections were held?
1 point
Clear selection
Question 15
You can paddle your canoe 7 miles per hour through any placid lake. You’re paddling through the Wabash river and the stream constantly flows at 3 miles per hour. The moment you start to paddle up stream, a fisherman looses one of his fishing bobbers in the water 14 miles up stream of you.  
How many hours does it take for you to reach the bobber?  
1 point
Clear selection
Submit
Clear form
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy