Examveda
Examveda

Which operator is used for assignment in C?

A. ==

B. =

C. :=

D. ->

Answer: Option B

Solution(By Examveda Team)

In C, the = operator is used for assignment. It is used to assign a value to a variable or a data location.

Option A (==) represents the equality operator, used to compare two values for equality.
Option C (:=) is not a valid operator in C programming.
Option D (->) is used for accessing members of a structure or union through a pointer to that structure or union, not for assignment.

This Question Belongs to C Program >> Operators And Expressions

Join The Discussion

Related Questions on Operators and Expressions