17 lines
298 B
C
17 lines
298 B
C
|
#include <stdio.h>
|
||
|
#include <assert.h>
|
||
|
|
||
|
void process_string( char *string )
|
||
|
{
|
||
|
/* use assert to check argument */
|
||
|
assert( string != NULL );
|
||
|
assert( *string != '\0' );
|
||
|
/* rest of code follows here */
|
||
|
}
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
process_string( "hello" );
|
||
|
process_string( "" );
|
||
|
}
|