Functions: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
< | <pre> | ||
#include <stdio.h> | #include <stdio.h> | ||
| Line 22: | Line 22: | ||
return 0; | return 0; | ||
} | } | ||
</ | </pre> | ||
Revision as of 03:30, 9 April 2007
#include <stdio.h>
void cfile(char *file)
{
FILE *fp = fopen(file, "w");
fprintf(fp, "example");
fclose(fp);
}
int add(int x, int y)
{
int r;
r = x + y;
return(r);
}
int main()
{
cfile("example.txt");
add(1,1);
return 0;
}