This group is created to discuss issues related to C++ programming
conditional operator
Hello, I just have a quick question about the conditional operator. Still a budding programmer here, I was going through this - https://www.scaler.com/topics/c/conditional-operator-in-c/ on conditional operator in c and wanted to understand as I am given x = 1, y = 2, and z = 3.I want to know, why after this statement: {Codey += x-- ? z++ : --z;That y is 5. The values after the statement are x = 0, y = 5, and z = 4. I know the way the conditional operator works is that it is formatted like…
Read more…
Comments