Hello all!
I don't know what is wrong with my program. I know i'm missing something but still i can't figure it out.
#define TRUE 1
#define FALSE 0
int search2Darray(int x)
{
int i, j;
for (i =0; i< 2; i++)
for (j=0; j < 10; j++)
if (a [j] == x)
return (TRUE);
return(FALSE);
}
#include <stdio.h>
int a[2] [10] = {49,28,32,43,12,23,57,98,2,20,11,33,47,87,90,17,99,4,30,19};
int main ()
{
if (search2Darray(33))
printf("33 is found in the array.\n");
else
printf("33 is not found in the array.\n");
getchar();
}