It is necessary to use variable in a program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

It is necessary to use variable in a program

9th Feb 2019, 4:17 AM
Oviya arumugam
Oviya arumugam - avatar
7 Answers
+ 12 - organize codes - increase readability - save memory - easy to debug
9th Feb 2019, 4:27 AM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 6
Program is created to process data, data is stored in variables before program can process it. A program without variables is meaningless.
9th Feb 2019, 5:01 AM
Calviղ - avatar
+ 6
Oviya arumugam Why are you asking this question? Based on your answers posted in a similar question, it's clear you know much about variables. It seems you would also know the answer to this question.
9th Feb 2019, 5:22 AM
David Carroll
David Carroll - avatar
+ 6
The simplest programs like those that output "Hello World" to the screen don't need variables but virtually all practical programs do need them.
11th Feb 2019, 3:13 AM
Sonic - avatar
+ 5
Consider a simple example: If you want to get input from user.... Then there should be a place for us to store it.. DECLARING VARIABLES MEANS YOU'RE RESERVING MEMORY FOR STORAGE... I don't think there's a way to store (Eg-input) need a variable (ie-placeholder)
9th Feb 2019, 4:30 AM
Saurabh B
Saurabh B - avatar
+ 4
Weird question that make me laugh. All we do with our code is to manipulate with input data to get new output data. Data is stored in variables, objects or on lower level of abstraction in registers. Even if you write simple program it will use registers implicitly. Maybe I can be wrong.
12th Feb 2019, 1:52 PM
Lev Tolstoy SPB
Lev Tolstoy SPB - avatar
Its used to store data buddy
11th Feb 2019, 5:56 PM
Shivam - avatar