Hi,
I've got some issues with a code which is number generator using static local variable. The loop while finishes suddenly before get the next loop. I get "Process return 10 (0xA)" on Codeblocks;
Code:
#include <stdio.h>
#include <stdlib.h>
void series(void);
char ch;
void main(void)
{
do{
series();
printf("Do you want to call series() function again: y or n \n");
scanf("%c",&ch);
}while (ch=='y');
void series(void)
{
static int series_num;
series_num = series_num + 10;
printf("series_num using static: %d \n", series_num);
}