That's really going to depend on how you design your program and what it's actually supposed to be doing.
Originally posted by Roaring_Tiger
Any alternative idea, without writing much code.
How about this:
void foo(int accountNum)
static int Prev_accountNum; /* init to 0 by default */
printf ("This time: %d\nLast time: %d\n", accountNum, Prev_accountNum);
Prev_accountNum = accountNum;
This time: 10
Last time: 0
This time: 20
Last time: 10
This time: 30
Last time: 20