Ok that make sense. I am now having trouble searching the entire deck. It searches the first thirteen then stops searching.
Code:
int search_deck(int deck[], int size)
{
int i;
char c,c2;
char suit[4][9]={"Diamonds","Hearts","Clubs","Spades"};
char rank[13][6]={"2","3","4","5","6","7","8","9","10","Jack","Queen","King","Ace"};
printf("\nEnter the desired rank of card followed by the suit(eg:2 D): ");
fflush(stdin);
scanf("%c %c",&c,&c2);
putchar('\n');
for (i=0; i<52; i++)
{
printf("%s of %s\n",rank[deck[i]%13],suit[deck[i]/13]);
if (suit[i][0]!=c2)
card++;
}
}