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

Types of bus - computer architecture, Types of Bus: Synchronous Bus ...

Types of Bus: Synchronous Bus All devices gain timing information from a common clock line. Each of these intervals constitutes a bus cycle at the time duration w

Briefly explain the floating point representation, Briefly explain the floa...

Briefly explain the floating point representation with an example? The floating point representation has 3 fields 1.sign bit 2.siginificant bits 3.exponent For  exa

Explain busy hour call attempts in telephone traffic, With reference to tel...

With reference to telephone traffic, explain the terms BHCA. BHCA: The number of call attempts in the busy hour is termed as busy hour call attempts (BHCA) that is an importa

What is process, What is Process? Process: A process is a program in ...

What is Process? Process: A process is a program in execution. It is an active entity, represented through the value of the program counter and the contents of registers o

Ds, explain about relations

explain about relations

What is drag, Move the mouse pointer over the object you wish to drag, and ...

Move the mouse pointer over the object you wish to drag, and then hold down the left mouse button. Whereas holding the mouse button, move the mouse pointer (and the object) to the

The spanning tree of connected graph with 10 vertices, The spanning tree of...

The spanning tree of connected graph with 10 vertices have 9 edges of spanning tree of connected graph with 10 vertices

Selection - artificial intelligence, Selection - artificial intelligence: ...

Selection - artificial intelligence: However the first step is to choose the individuals that will have a shot at becoming the parents of the next generation. Hence this is kn

Queue depth should be greater than zero, Tell me which queue having present...

Tell me which queue having present queue depth should be greater than zero? Ans) Event queues Open MQ Explorer by selecting Start > Programs > IBM WebSphere MQ > WebSphere

Define rotational latency and disk bandwidth, Define rotational latency and...

Define rotational latency and disk bandwidth. Rotational latency is the additional time waiting for the disk to rotate the desired sector to the disk head. The disk bandwidth i

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