What is the initial value of the static / global enum variable?

eg. earthquake motors have

typedef enum {qfalse, qtrue} qboolean;

When you do

static qboolean variable;

Is the variable initial value 0?

+3
source share
1 answer

Static and global variables are cleared by default if there is no value to initialize.

In your example, it variablewill have an equivalent enumeration 0, i.e. qfalse.

+6
source

Source: https://habr.com/ru/post/1781201/


All Articles