You should be doing a = malloc(sizeof(*a)); as well. Always take the thing on the left of the = and put it inside the sizeof operator with a * in front.
malloc works the same every time. You ask it for a certain number of bytes (sizeof(*a) or BCount*sizeof(*(a->Bptrs))). It either gives you that much memory or returns NULL. When you're done using the memory, remember that you have to call free(a->Bptrs) to free that memory before calling free(a). You free in reverse order from how you allocate.
Note that you should check the return value of malloc before carrying on. Doing a->Bptrs will likely cause a seg fault if malloc'ing a failed, so your code should be:
Code:
a = malloc(sizeof(*a));
if (a) {
a->Bptrs = malloc(BCount * sizeof(*(a->Bptrs)));
// if malloc'ing a->Bptrs fails, you have a serious problem
// handle it accordingly and exit your function/program
// make sure to free up any memory already allocated for a
}
else {
// if malloc'ing a fails, you have a serious problem
// handle it accordingly and exit your function/program
}