# Android Error

Computer Science Level 2

The series returns again! This time with color code formatting! (Thanks to the Brilliant Team)

Alex is wondering how to build an android robot that can do Mathfights for him. He is currently stuck on one part of the phase, though:

  1 2 3 4 5 6 7 8 9 10 //Written in C //Here is the bootloader.... printf("Booting up..."); int state = getAndroidState(); //gets current android state, this is a real function that returns an integer, whatever that means. if (state == 0){ //means ok printf("Booted up correctly. My name is Alex number 2."); } else //this means that it has boot problems{ printf("Uh oh..."); } 

What was his error? Input the number from the chart below:

 1 No errors. 2 No such function 'printf' 3 Comment placement incorrect 4 Forgotten Semicolon 5 Parse error: type 'int' cannot be explicitly casted as type 'char' 6 Parse error: type 'char' cannot be explicitly casted as type 'int' 7 Parse error: type 'int' cannot be implicitly casted as type 'char' 8 Parse error: type 'char' cannot be implicitly casted as type 'int' 9 I give up.

** Image credit: Flickr user D J

×