Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Engineering (https://www.askmehelpdesk.com/forumdisplay.php?f=561)
-   -   Can anyone explain how these 2 C programs work? (https://www.askmehelpdesk.com/showthread.php?t=798664)

  • Aug 7, 2014, 07:23 AM
    pbhuvanesh
    Can anyone explain how these 2 C programs work?
    Hello all,
    I have trouble undersandig this two c programs so could you please help me?

    Thanks in Advance.

    Program #1:

    #include<stdio.h>
    int main()
    {
    int I = 0, j = 0;


    if (I && (j =100 +10))


    {
    }


    printf("\n %d",j);


    return 0;
    }

    Program #2:

    #include <stdio.h>;


    int main()
    {
    int a = 10;


    if (a == a--)


    printf("TRUE 1\t");


    a = 10;


    if (a == --a)


    printf("TRUE 2\t");


    }

  • All times are GMT -7. The time now is 02:00 PM.