F
Frederick Gotham
Here's a sample function which converts a string to all uppercase:
#include <assert.h>
#include <ctype.h>
void StringUp( char *p )
{
do assert( *p >= 0 );
while( *p = toupper( *p ), *p++ );
}
Would the "Sequence point rule" be violated if the code were changed to the
following:
#include <assert.h>
#include <ctype.h>
void StringUp( char *p )
{
do assert( *p >= 0 );
while( *p++ = toupper( *p ) );
}
#include <assert.h>
#include <ctype.h>
void StringUp( char *p )
{
do assert( *p >= 0 );
while( *p = toupper( *p ), *p++ );
}
Would the "Sequence point rule" be violated if the code were changed to the
following:
#include <assert.h>
#include <ctype.h>
void StringUp( char *p )
{
do assert( *p >= 0 );
while( *p++ = toupper( *p ) );
}