debug was the wrong use in that sense. i was trying to turn a for loop on and off so that i can reuse a function rather having the same code repeated with an extra for loop ie
Code:
#include <stdio.h>
#include <stdlib.h>
void func1(void);
void func2(void);
int main()
{
int y =3;
if (y == 3)
{
func2();
}
else
{
func1();
}
return 0;
}
void func1(void)
{
int i, x;
for (i=0;i<=5; i++)
{
x += 1;
}
printf("%d",x);
}
void func2(void)
{
int i, j, x;
for (j=0;j<=2;j++)
{
for (i=0;i<=5; i++)
{
x += 1;
}
}
printf("%d",x);
}
hope this is clearer
coop