cannot have return value : <p>I'am trying to make code to make array to multidimensional array. 
I made 12 size of array B and also made array[3][4].
If call function value(B,3,1), it supposed to return value of array[3][1] or B[10].
But my code doesn't work. I cannot have return value. 
Help me !!</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;


int value(int *A, int j, int k);
void main(void){

    int n = 12;
    int *B;
    B=(int*)malloc(sizeof(int)*n);
    int i;
    printf("12개의 정수를 차례로 입력하시오.\n");
    for(i=0; i&lt;n ;i++ ){
       fflush(stdout);
       scanf("%d",&amp;B[i]);
    }
    value(B,3,1);
    //printf("call\n");
 }
 int value(int *A, int j, int k)
 {
    int i;
    int array[4][3];
    for(i=0; i&lt;12; i++){
        array[i/3][i%3]=A[i];
    }
    for(i=0; i&lt;12; i++){
        printf("%d ",array[i/3][i%3]);
    }
    return array[j][k];
}
</code></pre>
