Learning array, loops, printf and function calls