I have the doubt if calloc initialize to zero all of the elements of a struct array like:
#define MAXDATA 10
struct Est2 {
int dato0; // Index k
int dato1; // Index j
int dato2; // Index i
double dato3; // Y Coordinate
};
Est2 *myArray = (Est2*) calloc(MAXDATA, sizeof(Est2));
I'm asking this because I don't want the initial data of myArray have garbage or Is there a problem if I don't initialize the array with any value if later in the code I will initialize it anyway for example storing the result of some arithmetical operations? Thanks in advance.