これら2つのコード行のメモリ使用量に違いはありますか? int *a = malloc(10 * sizeof(int));
int b[10];
最初の行は、10の整数と1のポインタにメモリを割り当てる必要があります。しかし、私は第二のことについては分かりません。それはまた、10の整数と1つのポインタ、またはわずか10の整数のためにメモリを割り当てますか?
char type;
printf("What type of sort would you like to perform?\n");
scanf("%s", &type);
switch(type)
{
case 'bubble':
bubble_sort();
case 'selection':
case 'insertion':
default:
pri