lundi 3 octobre 2016

How is the value of b unchanged?

How is the value of b unchanged?

    #include <iostream> 
    int main()
 {      
    int a = 5, b = 10; 
    if (++a || ++b)     
    std::cout << a << b; 
    system("PAUSE"); 
    return 0;
  }   

The output is 610. But how?

Aucun commentaire:

Enregistrer un commentaire