Hi
I have to fix the bug in code where function should be execute n times. Provided method is out of the times. Below code to fix
I have to idea to fix it in belowe wayCode:void execute (void (*action)(), int nTimes) { for (int i = 0; i < nTimes; i += 1) { action(); } }
but id doesn't work properly and I don't knowe where is mistake.Code:static int i=0; void pusty(void) {i++;} typedef void (*action)(void); void execute (action pusty, int nTimes) { for (; i < nTimes;) { pusty(); } }