int multByTwo (int x) { int retval; retval = x * 2; return retval; } |
#include <stdio.h> int multByTwo (int x); int main (void) { int i; for (i = 0; i < 10; ++i) { int j; j = multByTwo (i); printf ("%d times two is %d\n", i, j); } |
i = multByTwo (37) + 4; |
int multByTwo (int x) { int retval; retval = x * 2; return retval; } |
int multByTwo (int x) { int retval; retval = x * 2; return retval; } |
i = multByTwo (37) + 4; |
double absolute_value (double d) { if (d >= 0) return d; else return -d; } |
int AddOne (int i) { i = i + 1; return i; } |
/* * power: calculate m to the n-th power */ int power (int m, int n) { int i; int product=1; for (i = 1; i <= n; ++i) product *= m; return product; } |
int getopt(int argc, char * argv[], const char * opts) { register char c; ... } |
int getopt(int argc, char * argv[], const char * opts) { register char c; ... } |
|
|
int power (int, int); void print_heading (void); void print_table (int); |
|
|
main.C:
|
| |||
print_table.C
|
main.C:
|
| |||
print_table.C
|
main.C:
|
| |||
print_table.C
|
main.C:
|
| |||
print_table.C
|
main.C
main()