#include <stdio.h>
int main() {
int a[2][4] = {
{1, 2, 3, 4},
{5, 6, 7, 8}
};
int b[4][2];
for(int i=0; i<=3; i++)
{
for(int k=0; k<=1; k++)
{
b[i][k] = a[k][i];
}
}
for(int i=0; i<=3; i++)
{
for(int k=0; k<=1; k++)
printf("%d ", b[i][k]);
printf("\n");
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: