Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of the following accesses a variable in structure b?

  • A.b->var;
  • B.b.var;
  • C.b-var;
  • D.b>var;

Answer: B

Correct answer: b.var;

b is a structure variable, so its members are reached with the dot: b.var. The arrow is for pointers.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.