GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Testing Tools  >  SilkTest

 Print  |  
Question:   What is enumerated data type?



January 01, 2008 06:37:08 #2
 testingeek   Member Since: January 2008    Total Comments: 8 

RE: What is enumerated data type?
 
 enumerated type is an abstract data type used to model an attribute that has a specific number of options (or identifiers) .
Eg :
enum cardsuit {
   CLUBS,
   DIAMONDS,
   HEARTS,
   SPADES
};

However at runtime the the enum will be implemented with an interger.
eg :
enum cardsuit {
   CLUBS    = 1,
   DIAMONDS = 2,
   HEARTS   = 4,
   SPADES   = 8
};
     

 

Back To Question