You are trying to initialize an array of characters with NULL . It makes no sense. For example, you will receive the same warning from
char a[100] = { NULL };
and it doesn't make sense the exact same way.
The "integer" indicated in the diagnostic message is the first element of the character array. char is an integer type in C and when you write
char a[100] = { NULL };
this is an attempt to initialize the 0th element of array a with NULL . On your platform, NULL declared as something with a pointer type, so the diagnostic message says that you are trying to make an integer ( a[0] ) from a pointer ( NULL ) without translation.
An even simpler example might look like this
char c = NULL;
and he will receive the same diagnostic message for the same reasons.
May I ask why you are trying to initialize char with NULL ? What were your intentions?
If you are not going to write name and position to arrays after initialization, perhaps you should use pointers instead of arrays, as in
struct company_prof { const char *name; size_t age; const char *position; } employee[] = { { "Job Bloggs", 23, "software engineer" }, { "Lisa Low" , 34, "Telecomms Technician" }, { "simon smith", 38, "personal assistist" }, { NULL , -1, NULL } };
Formally, in this case NULL makes sense. But not in the case of an array.
But less formally, the purpose of this entry { NULL, -1, NULL } at the end of the array is not yet clear to me. Is any final element? Why don't you just use the exact size of the array instead of creating a trailing element?