Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extern char buffer1[ 12 ];
- extern char buffer2[ 12 ];
- void f1 ( void )
- {
- ( void ) strcpy ( buffer1, "abc" );
- ( void ) strcpy ( buffer2, "abc" );
- /* The following use of memcmp is non-compliant */
- if ( memcmp ( buffer1, buffer2, sizeof ( buffer1 ) ) != 0 )
- {
- /*
- * The strings stored in buffer1 and buffer 2 are reported to be
- * different, but this may actually be due to differences in the
- * uninitialised characters stored after the null terminators.
- */
- }
- }
Add Comment
Please, Sign In to add comment