I am very new to C. coming from Python, Java and C# worlds. This might be a stupid question but I am getting segmentation fault:
// struct for storing matrices t
You have not allocated any memory to hold the float values. Prior to the memcpy you need something like:
A.elts = malloc(9* sizeof(float));