Array is a variable that can contain multiple elements with index starting from 0 whereas enum is an user defined datatype that contains a list of members for which an integer constant is assigned starting from 0. in case of enum the numbers starting from 0 are not indexes whereas in case of an array they are indexes. Also in case of enum you can assign your own constant values to the members that may or may not start from 0 and may or may not be in a sequence.
Related Posts:
- How to initialize array to 0 in C?
- How to properly malloc for array of struct in C
- Convert char array to a int number in C
- Returning an array using C
- How to copy a char array in C?
- C subscripted value is neither array nor pointer nor vector when assigning an array element value
- struct has no member named
- Initializing array of structures
- How to empty a char array?
- Can I create an Array of Char pointers in C?
- Excess elements of scalar initializer for pointer to array of ints
- How to allocate array of pointers for strings by malloc in C?
- typedef fixed length array
- C: warning: excess elements in array initializer; near initialization for ‘xxx’ ; expects ‘char *’, but has type ‘int’
- Pointer to 2D arrays in C
- Initializing 2D char array in C
- How do I check if a string contains a certain character?
- char *array and char array[]
- How do I create an array of strings in C?
- What does ** do in C language?
- Using Dynamic Memory allocation for arrays
- How do I create an array of strings in C?
- Finding the length of a Character Array in C
- Return char[]/string from a function
- Zero an array in C code
- Passing an array by reference in C?
- Excess elements in char array initializer error
- How to do scanf for single char in C
- Break statement not within loop or switch in C
- C++ array assign error: invalid array assignment
- Cache Simulator in C
- Where is the C auto keyword used?
- Initialization from incompatible pointer type warning when assigning to a pointer
- I’m getting “Invalid Initializer”, what am I doing wrong?
- Bind failed: Address already in use
- Warning/error “function declaration isn’t a prototype”
- What is the difference between %f and %lf in C?
- How to prevent multiple definitions in C?
- How to pass 2D array (matrix) in a function in C?
- How can you print multiple variables inside a string using printf?
- Iterate through a C array
- C dynamically growing array
- Why should we check WIFEXITED after wait in order to kill child processes in Linux system call?
- How to compile makefile using MinGW?
- Mapping a numeric range onto another
- Why are hexadecimal numbers prefixed with 0x?
- too many arguments for format [-Wformat-extra-args]
- What is the difference between char array and char pointer in C?
- cast to pointer from integer of different size, pthread code
- Invalid type argument of unary ‘*’ (have ‘int’) Error in C
- Why do I get “cast from pointer to integer of different size” error?
- error: too few arguments to function `printDay’ (C language)
- Where to find the complete definition of off_t type?
- printf not printing to screen
- Still Reachable Leak detected by Valgrind
- Assembly x86 – “leave” Instruction
- What is signed integer overflow?
- When to use const char * and when to use const char []
- Double pointer array in c++
- What do numbers using 0x notation mean?
- Does stack grow upward or downward?
- Convert Little Endian to Big Endian
- error C2371: ‘functionname’ redefinition: different basic types
- How does one represent the empty char?
- How to write to a file using open() and printf()?
- note: previous implicit declaration of ‘point_forward’ was here
- Can I define a function inside a C structure?
- What exactly is meant by “de-referencing a NULL pointer”?
- getc() vs fgetc() – What are the major differences?
- Can’t understand the working of getint() in C as per K&R
- C char array initialization
- Tokenizing strings in C
- Difference between char *argv[] and char **argv for the second argument to main()
- char array not assignable
- Warning: comparison of distinct pointer types
- In C, what exactly happens when you pass a NULL pointer to strcmp()?
- “-bash: gcc: command not found” using cygwin when compiling c?
- How to format strings using printf() to get equal length in the output
- What do \t and \b do?
- Why and when to use static structures in C programming?
- Where does linux store my syslog?
- Example of waitpid() in use?
- Can a function return two values?
- write() to stdout and printf output not interleaved?
- How to know what the ‘errno’ means?
- Split string with multiple delimiters using strtok in C
- Printf was not declared in this scope
- warning: missing terminating ” character [enabled by default]
- How to free memory from char array in C
- Can I get Unix’s pthread.h to compile in Windows?
- GCC: Array type has incomplete element type
- FFT in a single C-file
- Process exited with return value 3221225477
- malloc(sizeof(int)) vs malloc(sizeof(int *)) vs (int *)malloc(sizeof(int))
- %p Format specifier in c
- Level vs Edge Trigger Network Event Mechanisms
- variably modified array at file scope in C
- “Nothing to be done for makefile” message
- Convert Char to String in C
- What is the difference between signed and unsigned int