Define enumeration in computer programming, C/C++ Programming

Assignment Help:

Define Enumeration in Computer Programming?

Enumerated types enclose a list of constants that are able to be addressed in integer values.

We can declare variables and types as follows.

enum days
{
mon, tues, ..., sun
} week;

enum days week1, week2;

NOTE: As with arrays first enumerated name has index value 0. So mon has value 0, tues 1, etc.

week1 and week2 are variables.

We can define other values:

enum escapes
{
bell = `\a',
backspace = `\b',
tab = `\t',
newline = `\n',
vtab = `\v',
return = `\r'
};

We can also override the 0 start value:

enum months
{
jan = 1, feb, mar, ......, dec
};

Here it is implied that feb = 2 etc. 


Related Discussions:- Define enumeration in computer programming

C++ programming, give a program to accept and print 2_D Array

give a program to accept and print 2_D Array

C program to define power of a function, C program to define power of a fun...

C program to define power of a function: Write a program to use power of a function. void main() { int x,y,po=1,i,j; clrscr();   printf("Give x,y\n"); sca

Program that predicts users age, Program: Write a program that predicts...

Program: Write a program that predicts users' age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/she is younger or older than G (an

List, Is there any difference between List x; and List x ()? Can you please...

Is there any difference between List x; and List x ()? Can you please provide me assignment help.

#title.digital clock, Write a program to print a digital clock which displa...

Write a program to print a digital clock which displays the time for 2 hours .

Radix, a popular joke among computer is to say............

a popular joke among computer is to say............

Determine the capacitor voltage by c program, Write a program to determine ...

Write a program to determine V c for a given value of time (t)   #include stdio.h #include math.h void main() {      char prompt;   float vs,cr,t,vc;   /* input time */

Program, Write a ‘C’ program to accept any 3 digit integer number from the ...

Write a ‘C’ program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.

Develop diablo 2 lod 1.13d dupe method for closed battle.net, Develop Diabl...

Develop Diablo 2 LOD 1.13d Dupe Method for Closed Battle.net This hack is for diablo 2 lord of destruction The program must work on all realms, all cores, all ladders (4x rea

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