+ 22

In if else if statement if we change change the (7<9-1) { }does the value of 9 changes or will it remain same ?

if else statement

10th Jun 2018, 9:38 AM
Vijay(v-star🌟)
Vijay(v-star🌟) - avatar
7 Réponses
+ 12
It will be a temporary intermediate operation before final evaluation and does no effect on the original value. Consider this // Variables initialized and are ready for participating in program int x = 7; int y = 9; int z = 1; if (x < y-z) { // 7 < 8 evaluates to true // body } but y is still 9. However, for example, ++y or y+=2 etc. do change the original value of their operands.
10th Jun 2018, 9:50 AM
Babak
Babak - avatar
+ 19
ok i got it #include <iostream> using namespace std; int main() { int a=4,n=8; if(a<n-1) { cout<<n<<endl; } cout<<n; return 0; }// output 8 8
10th Jun 2018, 1:07 PM
Vijay(v-star🌟)
Vijay(v-star🌟) - avatar
+ 9
God bless you V-star🌟 . Now, you exactly know what's going on even in the middle of something like this if ( x < abs( sin(x) / f(x) + 0.5 )) { }
10th Jun 2018, 1:36 PM
Babak
Babak - avatar
+ 5
Sayan Mondal First, ask yourself, "Am I willing to make my hands dirty?!"
10th Jun 2018, 10:09 AM
Babak
Babak - avatar
+ 3
after computing 9-1only it evaluates 7<9-1 so the value changes
12th Aug 2018, 2:24 PM
Ramya
Ramya - avatar
+ 2
cout<<"hey dude can you tech me";
10th Jun 2018, 10:06 AM
Sayan Mondal
Sayan Mondal - avatar
0
the answer is false i think
18th Oct 2018, 10:01 PM
NOEL SKENSHEE PREGUNTAS MISTERIOSAS
NOEL SKENSHEE PREGUNTAS MISTERIOSAS - avatar