What is the index of the first element of an array?
0
What keyword is used to create a conditional branch in C?
If
What is the keyword used to define that a function does not return a value?
void
What does this Python code do
num1 = float(input("Enter the first number: ")) num2 = float(input("Enter the second number: ")) if num1 > num2: print(f"The first number ({num1}) is greater than the second number ({num2}).") elif num2 > num1: print(f"The second number ({num2}) is greater than the first number ({num1}).") else: print("Both numbers are equal.")
Get 2 numbers from the user and determines which is greater
What is the most recent iPhone released?
What happens when you send an array to a function and change a value in the array?
Which keyword allows you to skip the current iteration of a loop?
continue
What is the term for passing arguments to a function that is a copy of what is sent?
pass by value
What does this C++ code do
#include int main() { int number; std::cout << "Enter a integer: "; std::cin >> number; int result = 1; for (int i = 1; i <= n; ++i) { result *= i; } std::cout << result << std::endl; return 0; }
Finds the factorial of the number input by the user
Who won the World Series this year for MLB?
Los Angelos Dodgers
If you have a string in C, what built in function would you use to find the length? How does this function find the length?
strlen
it counts the number of characters until it hits a \0
When inside of a loop, what keyword allows you to forcefully exit the loop?
break
What is a function definition?
The code that is run when the function is called.
What does this Onyx code do?
use core {*} main :: () { n := read_line() |> conv.parse(u32, _)! v := 0 for i in 1 ..= n do v += i printf("Value: {}\n", v) }
Finds the sum from 0 until (and including) the number input by the user
What year was Minecraft fully released?
November 18, 2011
When sending a multidimensional array to a function, why are you required to specific all dimension sizes except the leftmost one?
Since all arrays in memory are single dimension arrays, the function needs to know how far to jump forward in that list.
Which type of loop guarantees that at least one iteration will occur?
do-while
What is the term for the pieces of information sent to a function?
parameters
What does this Elixir code do / output
IO.gets("> ") |> String.trim() |> String.split(" ") |> Enum.map(&String.to_integer/1) |> Enum.max() |> IO.puts()
User types in a list of numbers that are space separated and the program outputs the max
In League of Legends lore, who is Kai'sa's father?
Kassadin
When passing an array to a function, what is actually passed to the function instead of the entire array itself?
A pointer to the first element in the array
What is a recursive function
a function that calls itself
What does this Haskell code output
foo :: [Int] -> Int foo [] = 0 foo (x:xs) = x + foo xs main :: IO () main = do let numbers = [1, 2, 3, 4, 5] print (foo numbers)
prints the sum of the numbers (15)
What does the Jake Jake no Mi fruit allow the user to do in One Piece?
Become a jacket and be worn by others.