Enum statement differ from a typedef statement, Computer Engineering

Assignment Help:

How does an enumstatement differ from a typedef statement?

Typedef statement permits user to define an identifier that would show an exiting data type. The user-defined data type identifier can be used further to declare variables. It has the following syntax

                                     Typedef   datatype identifier;

Where data type refers to exiting data type and identifier is the new name given to this data type. For example

                                     Typedef int nos;

nos here symbolizes int type and now it can be used later to declare variables like

                                   nos num1,num2,num3;

Enum statement is used to declare variables that can have one of the values enclosed within braces called as enumeration constant. After declaring this, we can declare variables to be of this 'new' type. It has the following syntax

   enum identifier {value1, value2, value3......,valuen);

 


Related Discussions:- Enum statement differ from a typedef statement

What is binary, Binary is an alternative number system which works very goo...

Binary is an alternative number system which works very good for computers. Humans have ten fingers; that's probably why we use ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) in our

Define flowchart, Define Flowchart. A  process  of  expressing  an  alg...

Define Flowchart. A  process  of  expressing  an  algorithm  by  a  collection  of  linked  geometric  shapes   containing explanations of the algorithm's steps.

Explain what is a macro and why is it important, Question 1: Spreadshee...

Question 1: Spreadsheet packages are widely used in Business. a) Explain why spreadsheets are so useful. b) Spreadsheet files are sometimes saved for use by other software p

Average waiting time, Customer arrivals at a gas station can be characteriz...

Customer arrivals at a gas station can be characterized by exponential distribution with mean of 10 minutes. The amount of time they take to pump gas can be characterized by an ex

What is internal path length, Internal Path length It is described as t...

Internal Path length It is described as the number of node traversed while moving by one particular node to any other node in the tree.

What is stack and register manipulation, Q. What is Stack and register mani...

Q. What is Stack and register manipulation? Stack and register manipulation: If we create stacks, stack instructions prove to be useful. LOAD IMMEDIATE is a good illustration

System software, define the properties of interactive operating systems

define the properties of interactive operating systems

Angle of elevation and depression, in building a suspension bridge a cable ...

in building a suspension bridge a cable is to be stretched from the top of a pier to a point 852.6 ft. from it''s foot. if from this point the angle of elevation of the top of the

First order predicate logic-artificial intelligence, First Order Predicate ...

First Order Predicate Logic This is a more expressive logic because it builds on propositional logic by allowing us to use constants, predicates, variables, quantifiers and fun

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd