Calls debugging

Report a typo

Using the debugger, find out which branch of if statement in the main function the program is executing. Then, figure out with which argument values the program calls the printXor function.

fun printXor(condition1: Int, condition2: Int) {
    println(condition1 xor condition2)
}

fun main() {
    val condition1 = 175892
    val condition2 = 98795

    if (condition1 and condition2 > 35925)
        printXor(condition1 - condition2, condition1 or condition2) // 1
    else
        printXor(condition1 xor condition2, condition1 and condition2) // 2
}

Enter the answer as 3 numbers separated by one space character in the following order: <branch number> <condition1 argument value> <condition2 argument value>.

Enter a short text
___

Create a free account to access the full topic