The word "literal" means "literal". It is an object whose value -- its literal meaning. For example: "hello" is a string literal with value "hello". Or -- 42 is an integer literal with a value of 42. The opposite of literal, in a sense, is a variable. A variable is a object whose value-the last value assigned to it. For example: char a = "hello world"; -- a is a string variable with the value "hello world". Or int answer = 40 + 2; answer -- an integer variable with value 42.
Operand-is the operation argument. In many contexts, literals and variables can be operands. For example: a; operation here -- , the capture element of the array, the operands -- a, and 0, one of them is a variable and the other literal.
Leann39 answered on July 2nd 19 at 14:49
# "Hello world" literal
# somevariable is not a literal
# addition - binary operation
# x and 3 operands
# 3 and, in addition, and literal
x + 3
asia_Lesch30 answered on July 2nd 19 at 14:51
What Wikipedia says:
Literal (eng. literal ) — the entry in the source code of a computer program, which is a fixed value. Literals are also called the representation of the value of some data type.
Operand (eng. operand) in programming languages ― the argument of the operation; data that is processed by the team; grammatical construction that denotes an expression that specifies which argument value of the operation. Sometimes the operand called location, position in the text where there must be an argument of the operation.
We conclude operand and the literal is not the same thing.