answersLogoWhite

0


Best Answer

The enum keyword means enumeration.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is meant by enum in C programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

In c plus plus you cannot assign integer value to enum?

That is correct - In c plus plus you cannot assign integer value to enum - You can only assign an enum value to an enum. Even though an enum looks like an integer, it is not. It is an enum, and C++ implements strict type checking to reduce the probability of bad programming practices. enum ColorCode {black, brown, red, orange, yellow, green, blue, violet, grey, white}; ColorCode myColorCode; myColorCode = yellow; Even though yellow has an integer value of 4, you cannot say myColorCode = 4.


How do you pass enum object as argument to function in c?

You can't pass an enum as an argument to a function. An enum in C isn't an object, it's a type. All you can do is pass a variable that is of the particular enum's type.


What is difference between C enum and C plus plus enum?

In C++, enum signifies a slightly stronger type than in C. For example, in C, one could write: enum Direction { UP, DOWN }; Direction d = 1; In C++, this would be illegal, only UP or DOWN can be assigned to a variable of type Direction, though there is still implicit casting to integer, so one could still write: int i = UP; Another difference has to do with the way variable are declared in general in C++. In C, once the enum was declared as above, declaring variables of type Direction would have to be done through the enum keyword, like this: enum Direction d = UP; In C++, the name "Direction" becomes a type in itself, so you can write: Direction d = UP;


C plus plus program that display student name course and grade using arrays of strings?

enum field { name, course, grade }; std::string student[3]; student[name] = "Joe Bloggs"; student[course] = "C++ Programming"; student[grade] = "A+";


What is new keyword in c?

enum, void and const are relatively new keywords in Cnew, on the other hand, isn't a keyword in C

Related questions

In c plus plus you cannot assign integer value to enum?

That is correct - In c plus plus you cannot assign integer value to enum - You can only assign an enum value to an enum. Even though an enum looks like an integer, it is not. It is an enum, and C++ implements strict type checking to reduce the probability of bad programming practices. enum ColorCode {black, brown, red, orange, yellow, green, blue, violet, grey, white}; ColorCode myColorCode; myColorCode = yellow; Even though yellow has an integer value of 4, you cannot say myColorCode = 4.


How do you pass enum object as argument to function in c?

You can't pass an enum as an argument to a function. An enum in C isn't an object, it's a type. All you can do is pass a variable that is of the particular enum's type.


What is difference between C enum and C plus plus enum?

In C++, enum signifies a slightly stronger type than in C. For example, in C, one could write: enum Direction { UP, DOWN }; Direction d = 1; In C++, this would be illegal, only UP or DOWN can be assigned to a variable of type Direction, though there is still implicit casting to integer, so one could still write: int i = UP; Another difference has to do with the way variable are declared in general in C++. In C, once the enum was declared as above, declaring variables of type Direction would have to be done through the enum keyword, like this: enum Direction d = UP; In C++, the name "Direction" becomes a type in itself, so you can write: Direction d = UP;


What does the term enum refer to in computer programming?

The term 'enum' is short for 'enumerated type'. An enumerated type is a data type containing a set of values called elements. They can also be called members or enumerators.


Why does c do not accept the?

"the" is not a keyword in the C Programming Language. Perhaps you meant "const" HTH Richard Wolf Software Architect


C plus plus program that display student name course and grade using arrays of strings?

enum field { name, course, grade }; std::string student[3]; student[name] = "Joe Bloggs"; student[course] = "C++ Programming"; student[grade] = "A+";


What is meant by for loop in C programming?

loops execute a set of insructions repeatedly for a certain numbers of times..


What are the Definitions on programming?

Programming is a term that describes the usage of a programming language. Programming languages (C++ for example) are languages that create programs, these programming languages should not be confused with scripting languages. Scripting languages are languages that are meant to be interpenetrated by programs. (Written in a programming language)


What is new keyword in c?

enum, void and const are relatively new keywords in Cnew, on the other hand, isn't a keyword in C


What is the difference between CA and C plus plus?

CA is an abbreviation for chartered accountant (Ca is the chemical symbol for calcium, which is an element). C++ is a programming language. If you actually meant what is the difference between C and C++ programming languages, then the main difference is that C++ incorporates object-oriented programming whereas C does not. Otherwise both languages are largely the same, insofar as most C programs will compile under C++ with relatively minor modification.


What is meant by contiguous memory allocation in C?

Contiguous memory allocation in C programming refers to the assigning of consecutive memory blocks to a process. Contiguous memory allocation is one of the oldest and most popular memory allocation schemes in programming.


What is c and c in computer programming?

C and C++ are both high-level programming languages.