#include <stdio.h>
int countodd(int arr[], int n);
int main() {
int arr[]={1,2,3,4,5,6,7,8};
printf("%d",countodd(arr,8));
return 0;
}
int countodd(int arr[],int n){
int count = 0;
for(int i=0;i<n;i++){
if(arr[i] % 2 != 0){
count++;
}
}
return count;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: