Sample Program
On-Line Demonstrations of FlexeLint and PC-lint (aka FlexeLint for Windows)
Bug of the Month for April 2005
Bug of the Month Samples
Why does this C program print '1' rather than '0'?
Modify this example, if desired, and then hit the Analyse Code button
#include
#define Raining 0x04 int bring_flowers( unsigned u ) { if( u & Raining == 0 ) return 0; else return 1; } int main() { printf( "%d\n", bring_flowers( 0x1B ) ); return 0; }
Run FlexeLint on Bug of the Month Samples
Home
|
Examples
|
Contact
|
Order
PC-lint and FlexeLint are trademarks of Gimpel Software
Copyright © 2009, Gimpel Software