Examveda
Examveda

What does the ++ operator do in C when applied to a variable?

A. Decrements by 1

B. Adds 1

C. Doubles the value

D. Leaves it unchanged

Answer: Option B

Solution(By Examveda Team)

When the ++ operator is applied to a variable in C, it increments the value of the variable by 1.

Option A (Decrements by 1) is incorrect as the ++ operator increases the value.
Option C (Doubles the value) is incorrect as the ++ operator adds 1, not doubles the value.
Option D (Leaves it unchanged) is incorrect as the ++ operator explicitly increments the variable's value by 1.

This Question Belongs to C Program >> Operators And Expressions

Join The Discussion

Related Questions on Operators and Expressions