Vidyalelo
C# Programming · Q22

Operators and Expressions in C Sharp

Programming · C# Programming · question 22

Q22

Which of the following is the correct way to decrement a variable by 1 in C#?

A.
x--;
B.
--x;
C.
x -= 1;
Answer
D.
x = x - 1;

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board