?
Which operator is used for assignment in C?
Answer & Solution
Correct Answer:
Option
B
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.
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.
Join the Discussion
Login to post a comment or share your explanation.
Login