home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sams Teach Yourself C in 21 Days (6th Edition)
/
STYC216E.ISO
/
mac
/
Examples
/
Day12
/
Ex12_06.c
< prev
next >
Wrap
C/C++ Source or Header
|
2002-05-04
|
501b
|
29 lines
#include <stdio.h>
void a_sample_function( );
int main( void )
{
a_sample_function();
return 0;
}
void a_sample_function( void )
{
int ctr1;
for ( ctr1 = 0; ctr1 < 25; ctr1++ )
printf( "*" );
puts( "\nThis is a sample function" );
{
char star = '*';
int ctr2; /* fix */
puts( "\nIt has a problem\n" );
for ( ctr2 = 0; ctr2 < 25; ctr2++ )
{
printf( "%c", star);
}
}
}