------------------------------------------------------------------------------
MC logo
Watch Out For This
[^] Code Examples
------------------------------------------------------------------------------
<<Using Update Operators anotc.c Comparison Pitfall>>
#include <stdio.h>

int main() 
{
        int n;

        /* Read and test a value. */
        scanf("%d", &n);
        if(n = 5)
                printf("You entered five!\n");
        else
                printf("You FAILED to enter five!\n");

        printf("Your number: %d.\n", n);
}
Reading: Ch.6
<<Using Update Operators Comparison Pitfall>>