Which operation can be applied directly to two whole structure variables of the same type in C?
Correct answer A. Assignment with =
Explanation
Structures of the same type can be assigned, passed to functions and returned by value, which copies all members. C does not define ==, < or arithmetic on structures, so a == b is a compile error. To compare structures you compare the members one by one; memcmp is unreliable because padding bytes may hold different values.
Answer checked How we write and check questions
Discussion