// Online C compiler to run C program online #include <stdio.h> void changeEven(int a[], int *p){ for(int i = 0; i < 5; i++){ if(a[i]%2==0){ a[i] = 0; } } for(int i = 0; i< 5; i++){ printf("%d", a[i]); } } int main() { int a[5] = {8,4,3,7,2}; int x; a[5] = x; changeEven(a,&x); return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter