home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_09_01
/
9n01048a
< prev
next >
Wrap
Text File
|
1990-11-14
|
428b
|
34 lines
Listing 1
Function Definitions for K&R and ANSI
#define ANSI 1
#include <stdio.h>
#include <myheader.h>
int main()
{
int i;
for (i = 0; i < 10; i++)
printf("\n%d", func1(i));
}
#ifdef ANSI
int func1(int i) /* For an ANSI compiler */
#else
int func1(i) /* For a K&R compiler */
int i;
#endif
{
return i * i;
}