Are struct and union composite data types or user-defined data types?

Debojit Acharjee 455 Reputation points
2023-06-01T13:40:30.34+00:00

I want to know whether struct and union composite data types or user-defined data types?

What is the difference between a composite and user-defined data types?

Developer technologies C++
Developer technologies Visual Studio Other
Developer technologies C#
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2023-06-01T15:13:39.58+00:00

    A user defined type is any type that is not built in. You can use enum, typedef, struct, and union to define a user defined type.

    a composite type, is a type that holds multiple types. A struct or a union can define a composite type.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.