1#include<iostream>
2int copyOdd (int A[], int sizeA, int B[]);
3
4
5
6int main ()
7{
8 int arr [] {1,2,3,4,5,6,7,8,9,10};
9 int Odd [5] {0,0,0,0,0};
10 copyOdd(arr,9,Odd);
11
12
13 for(int i = 0 ; i < 5; ++i)
14 {
15 std::cout<<Odd[i]<<' ';
16 }
17 std::cout<<std::endl;
18
19 return 0 ;
20
21}
22
23int copyOdd (int A[], int sizeA, int B[])
24{
25 int j {0};
26 B [5];
27 for(int i = 0 ; i < sizeA ; ++i)
28 {
29 if(A[i]%2 == 1)
30 B[j++] = A[i];
31
32 }
33
34 return B[5];
35}