Computer Science, asked by dasmobilecall, 10 months ago

which statement is used to assign a value to a variable ​

Answers

Answered by ashishsahoo62
41

Explanation:

The most common form of statement in a program uses the assignment operator, =, and either an expression or a constant to assign a value to a variable: variable = expression; variable = constant; The symbol of the assignment operator looks like the mathematical equality operator but in C++ its meaning is different.

Answered by Chaitanya1696
8

The statement that is used to assign a value to a variable is the assignment operator denoted by '='.

  • The basic symbol that is used in C ++ is a programming language and a variable is used to specify the action or function of the instruction given in the development of the coding.
  • Therefore, this is the symbol that is used commonly in C ++ to assign value to a variable.
  • For example, if the variable is an expression or a constant, therefore, we will write the variable as variable=expression or variable=constant.
  • Hence, in the programming language, there is a mathematical expression for every instruction.
  • Hence, the correct answer is the assignment operator.

Similar questions