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

Discussion

Which of the following share a similarity in syntax? 1. Union 2. Structure 3. Arrays 4. Pointers

  • A.3 and 4
  • B.1 and 2
  • C.2 and 3
  • D.All of the above

Answer: B

Correct answer: 1 and 2

Unions and structures are declared with identical syntax - keyword, optional tag, a braced list of members - and their members are accessed the same way, with . and ->. Only the storage differs: a structure lays its members out separately, a union overlays them.

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

Post your comment

Please log in or register to post a comment.