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