IHYPRESS.NET > C PROGRAMMING
HOME | CLASSIC ASP | C | HTML/CSS | JAVASCRIPT | PERL | PHP | PYTHON | RUBY
C > 05. Functions I [PROGRAM #01]
CODERESULT
 
/* A user-defined function without argument nor result */
#include <stdio.h> /* the function definition */ void stars (void) { printf ("********************************\n"); } /* end of function definition */ /* main program */ int main (void) { printf ("The line of stars comes from a function.\n"); /* calling the function */ stars (); /* the function can be called as will*/ printf ("\n"); stars (); printf ("Hello world!\n"); stars (); return (0); }
Legend: preprocessor directives | variable declarations main function | helper functions | user-defined structures comments
The line of stars comes from a function.
********************************

********************************
Hello world!
********************************
>
COPYRIGHT © 2021 IHYPRESS.NET. A DIVISION OF IHY PRESS, KIRKLAND, WA 98083 USA. ALL RIGHTS RESERVED.