I have a basic structure like this
typedef struct struck {
char* id;
char* mat;
int value;
char* place;
} *Truck;
And afunc
Your usage of sizeof is incorrect. In general, the argument to malloc() needs to be "the size of that which the returned pointer is pointing at". In other words, you need sizeof *nT. See how that also eliminates repeating the type name (Truck)?
Also, in C you don't need to cast the return value of malloc(); it serves no purpose, can hide an actual error, and makes the code harder to read.
As others have pointed out, you're also not allocating space for any string data, all you have are the pointers in your structure.