以下のコードに問題があります。
...
int anInteger;
...
//anInteger gets a value
...
int *anotherInteger;
label = (int *)malloc(sizeof(int));
strncpy(anotherInteger, anInteger, 40);
基本的に私がやりたいことは、整数からメモリを割り当てた他の整数に値をコピーすることです。これは整数間の strncpy で機能しますか、それとも別の関数が必要ですか?