encountered a strange problem
 procedure is simplified like this, first enter an integer n, then enter n integers into the array 
 and then enter an integer m, and then enter m integers into the array 
 is required to intersect, as a result, there is a problem in the for loop, as long as the assignment operation appears in the for loop to report an error 
 for example, I wrote flag=5, but temp = * (bp+i); tempPP can. What"s going on with asking for advice? 
-sharpinclude <stdlib.h>
-sharpinclude <stdlib.h>
int main(void){
    int a,b;
    int i,j;
    int flag;
    int *ap = (int *)malloc(sizeof(int)*a);
    int *bp = (int *)malloc(sizeof(int)*b);
    scanf("%d",&a);
    for(i=0;i<a;iPP){
        scanf("%d",ap+i);
    }
    scanf("%d",&b);
    for(i=0;i<b;iPP){
        scanf("%d",bp+i);
    }
    /********************************/
    int *p = (int *)malloc(sizeof(int)*(a+b));
    int *temp = p;
    for(i=0;i<a;iPP){  //a
        *(p+i) = *(ap+i);
    }
    temp = temp + a ; //
    for(i=0;i<b;iPP){  //b
        flag = 5 ;
        /*temp = *(bp+i);
        tempPP;*/
    }
    //printfArr(p,a);
    //printfArr(p,a+b);
    return 0;
}