• Source
    1. #include <stdio.h>
    2.  
    3. int main(void) {
    4. volatile unsigned int temp = 10;
    5.  
    6. // this is valid C syntax.
    7. if( 10 == temp )
    8. {
    9. temp = 30;
    10. }
    11.  
    12. // this will generate error.
    13. if( 10 = temp )
    14. {
    15. temp = 40;
    16. }
    17.  
    18. printf("value of temp : %d \n", temp );
    19. }
    20.