Programming Fundamentals quizzes
How variables, conditions, loops, and functions help you write clear instructions and solve problems with code.
1 quiz
28 questions
Quizzes in this topic
Try a question
From Programming Fundamentals: Variables, types and expressions · Variables and Assignment
What is the classic way to swap two variables in a language without special swap syntax?
- Assign each variable to itself first
- Write the two assignments in reverse order
- Save one value in a temporary variable
Show the answer
Answer: Save one value in a temporary variable
A temporary variable keeps one value safe while it is overwritten: temp = a, a = b, b = temp.
A few questions at a time, before your apps
BrainTok asks a few questions from quizzes like these before the apps you choose open, so your screen time turns into learning. For iPhone.
Join the beta