General Motors (GM) interview question

run a function and figure out the output