What is the purpose of a variable in programming?

  • Displaying data
  • Executing code
  • Looping
  • Storing data
A variable in programming is used to store data temporarily. It allows the programmer to assign a value to a symbolic name, making it easier to manipulate and reference data throughout the program. For example, in a simple calculator program, a variable named "result" might be used to store the outcome of a calculation.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *