#include<stdio.h> #define M 3 #define N 4 int main() { int s[M][N]={{1,2,3,4},{5,6,7,8},{9,10,11,12}}; for(int i=0;i<M*N;i++) printf(" %d ",s[i/N][i%N]); return 0; }