vendredi 29 mai 2015

output of this c program is weird ,instead of value -4 at second position third line it shows -5 how?

#include<stdio.h>
int main()
{
    int a=5,b=9;
    char ch='c';
    printf("%c %c\n",ch,++ch);
    printf("%d %d\n",a,!!a);
    printf("%d %d %d\n",a=a+2,-a + ++b%a,a<<2);//
    printf("%d",a);
    return 0;
}



/* 
    op
    d d
    5 1
    7 -5 20
    7
*/

output of this c program is weird ,instead of value -4 at second position third line it shows -5 how? i am using devc++IDE

Aucun commentaire:

Enregistrer un commentaire