int square(int i); 或 main()
main() { int square(int i);
{ int i=10,j=2; int i=10,j=2;
j=square(i); j=square(i);
} }
int square() int square(int i)
{return i*i;} {return i+i;}
#include< stdio.h >
struct point {int x,y;};
struct rect {point topLeft, bottomRight};
int pointInRect(struct point, stuct rect);
extern point currentLoc;
設檔案 file.c 含下列內容:
#include "file.txt"
point currentLoc;
int pointInRect(struct point p, stuct rect r)
{ int x1,x2,y1,y2;
if(r.topLeft.x < r.bottomRight.x)
{ x1=r.topLeft.x; x2=r.bottomRight.x;}
else
{ x2=r.topLeft.x; x1=r.bottomRight.x;}