Code:Code:#include<stdio.h> main() { int a[]={1,2,3,4,5}; evenshow(a); } void evenshow(int a[]) { int i; for(i=0;i<=5;i++) { if(a[i]%2==0) { printf("%d",a[i]); } } }
Code:Code:#include<stdio.h> main() { int a[]={1,2,3,4,5}; evenshow(a); } void evenshow(int a[]) { int i; for(i=0;i<=5;i++) { if(a[i]%2==0) { printf("%d",a[i]); } } }
Lack of a function prototype for evenshow is my guess.
After that, I would guess user error.
Tim S.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
a) Lack of function prototype
b) Out-of-bounds read from array (a[5])