You should be able to store the data for each card within an integer. You could then get the suit as card / 10 and you could get the rank as card % 10. I find this approach simplifies things a little.
You could then have an array size 40 to hold the cards, which would be shuffled when you start the game.
Instead of passing structs around between the deck an the players you keep an index of the stack position in the deck. Every time you deal a card copy the card value at the stack position to the players hand and increment the stack position. When you reach the end of the deck the you can reshuffle the cards or something.
Heres crude example of how to get a random number:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
srand(time(NULL)); //seed randomisation only once at start of game
printf("Random number (0 - 39): %d\n", rand() % 40); // print a random umber
return 0;
}
A simple way to time the game would be to call clock() at the start of the game and save the return value. At the end of the game call clock again and subtract the start time from the end time. You then might want to convert the result tom minutes and seconds.
To write to files look up fopen and fprintf.