Forum

Enumerated Data type in C

This thread contains 1 reply, has 2 voices, and was last updated by Test 4 years, 6 months ago.

  • Author Replies
    • #61888

      What is Enumerated Data type in C explain with example?


    • #61889

      Hello,

      In C programming, an enumerated type is a data type consisting of a set of named values called elements, members, numeral, or enumerators of the type.

      The enumerator names are usually identifiers that behave as constants in the language. An enumerated type can be seen as a degenerate tagged union of unit type.

      Example:
      enum flag {const1, const2, …, constN};

      By default, const1 is 0, const2 is 1 and so on. You can change default values of enum elements during declaration (if necessary).


Viewing 1 reply thread

You must be to reply to this thread.Please or . Registration is 100% free.

GET FREE CONSULTATION

Call Us Now For Free Consultation97370 05566

Our experts listen to you patiently and suggest you the right course after conducting a personality profile test. Register your interest below to schedule personality profile test for you.

SUBSCRIBE TO OUR NEWSLETTER

Copyright 2016-2024 Smart Mentors. All Rights Reserved.

Login

FORGOT PASSWORD

Sign up now to Become An Instructor

    Register your Interest

      cf7captchaRegenerate Captcha