#include <stdio.h>

void same(int *A, int *B){
    for (int i = 0; i < 5; i++) {
        for (int j = 0; j < 5; j++) {
            if (*(B + i) == *(A + j)) {
                printf("%d ", *(B + i));
            }
        }
    }
}

int main() {
    int A[5] = {1,2,3,4,5};
    int B[5] = {3,4,5,6,7};

    same(A, B);

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: