You can use something like this:
while ((c = getc(fp)) != EOF)
if(c == 32) ....
You can use something like this:
while ((c = getc(fp)) != EOF)
if(c == 32) ....
Maybe you could use somthing like this:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define RESULT_FAILURE -1
#define RESULT_SUCCESS 0
int16_t fun(char *iaddr)
{
char* p = NULL;
int i = 0;
int len = 0;
int rc = RESULT_SUCCESS;
if(strlen(iaddr)>0)
{
len = strlen(iaddr)+1;
p = (char*)malloc(len );
strcpy(p,iaddr);
for(i=0;i<len;i++)
{
printf("%c", p[i]);
}
free(p);
}
else
{
rc = RESULT_FAILURE;
}
return rc;
}
int main()
{
int rc;
rc= fun("10.3.28");
printf("irc=%d",rc);
return 1;
}
Just call the method that defined for button event into timer event method.
private void timer1_Tick(object sender, EventArgs e)
{
button1_Click( sender, e);
}
you also could put null for parameters.
private void timer1_Tick(object sender, EventArgs e)
{
button1_Click( null, null);
}
As I understand this is not a recursive problem because
F(1) is not defined. Also I cant find any
F(a) = F(a+n) is not possible
so this is not recursive.