インデント入れ直しました。
malloc関数に関する質問です。
#include <stdlib.h>
#include <stdio.h>

struct st {
int a;
};

void func(struct st* b) {
b = (struct st*)malloc(sizeof(struct st*));
printf("2.func:%p\n",b);
// free(b);
}

void main(void) {
struct st* a = NULL;
printf("1.main:%p\n",a);
func(a);
printf("3.main:%p\n",a);
}
を実行すると
   1.main:00000000
   2.func:00431EA0
   3.main:00000000
   Press any key to continue
と出力されます。次の出力
   1.main:00000000
   2.func:00431EA0
   3.main:00431EA0
   Press any key to continue
を期待していたのですが、うまくいきません。何が原因でしょうか?