What is the difference between a variable and value?

Answer Posted / veveritoiulpofticios

Variables are storage for values. They are identified by a name.

Values are a pair of:
1) a representation (numbers stored in computer memory)
2) a meaning associated with that representation (also called a type).

Example (C programming language):
char c = 'A';

c is a variable (a location in computer memory, identified by the name c)

c stores the value 'A', which is:
the number 65, meaning the index of character A in the ASCII table.

Is This Answer Correct ?    27 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I edit a .sh file?

624


What is a file basename?

594


What happens when you type ls?

566


Why do we write bin bash in shell scripts?

546


How does ls command work?

586






What is awk script?

546


What is the significance of the shebang line in shell scripting?

531


What is the use of "$?" Sign in shell script?

619


What is awk in shell script?

754


Print the 10th line without using tail and head command.

1674


How do scripts work?

610


I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?

754


What is the lifespan of a variable inside a shell script?

1125


Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.

801


How to print all the arguments provided to the script?

557