What is the probem with the following code, somebody please explain. May be I am missing some test case!
#include< stdio.h >
#include< stdlib.h >
int main()
{
int n,i=0,arr[] = {2,43,6,76,87,77,34,23,42,40,6,75,65};
while (arr[i] || arr[i]==0)
{
if (arr[i] == 42)
exit(0);
printf("%d\n",arr[i]);
i++;
}
return 0;
}