Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  qq
Language: C/C++
Code:
#include<stdio.h>
int* pass()
{
     int i,j,b[2][3];
     for(i=0;i<2;i++)
     {
          for(j=0;j<3;j++)
          scanf("%d",&b[i][j]);

     }
     
return(b);
}
int main()
{

static int i,j;
     int *a;
     a=malloc(6*sizeof(int));
     a=pass();

          for(i=0;i<2;i++)
     {
          for(j=0;j<3;j++)
          printf("%d\n",*(a+i*3+j));
     }

}

Comments: