I've initialized an array of structs with three items and it is showing 2 for me !!!
#include <stdio.h>
typedef struct record {
int value;
char *name;
} record;
int main (void) {
record list[] = { (1, "one"), (2, "two"), (3, "three") };
int n = sizeof(list) / sizeof(record);
printf("list's length: %i \n", n);
return 0;
}
What is happening here? Am I getting crazy?
record list[]
properly.