0
What is the logic behind this code to find this output?
int a=14; for( int i = 0; i<=7; i ++) { a++; } cout<<a;
3 Respuestas
+ 1
When loop runs first time "a" becomes 15 and "i" becomes 1 so when "a" becomes 21 ,"i" becomes 7 ,since "i" is still less than equal to 7 so loops runs one last time and a final value comes out as 22
0
8 times incrementing 'a' value.
Just a quiz question..?