IHYPRESS PROGRAMMING
Tutorials and C programs with code and output for beginners
HOME
|
ASP
|
C
|
CSS
|
GNUPLOT
|
HTML
|
JAVASCRIPT
|
PERL
|
PHP
|
PYTHON
|
RUBY
|
SVG
C
❯
Advanced Programming
: Function Macros
<12.07>
//function macros #include <stdio.h> #define CUBE(x) (x * x * x) #define REPORT(a,b) (printf("a is %d and b is %d\n", a, b)) int main (void) { int n = 6; printf ("The cube of %d is %d\n", n, CUBE(n)); REPORT (10, 20); return (0); }
The cube of 6 is 216 a is 10 and b is 20
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland