+ 7
First: If you think about it, the first loop runs three times, meaning count would be -3. But there's another for loop, which also executes thrice, meaning count will be added 3 times. If you do the math, which isn't that complicated: -3 + 3 * 3 = 6 Second: The return keyword stops executing the function, whatever is after it, is ignored. Meaning it will return 7++, which is still 7
8th Jul 2019, 6:32 AM
Airree
Airree - avatar
+ 3
when first loop run inner loop will run 3 times which means when first loop run count-- is -1 (0-1) and inner loop increment count three times( -1 +3 = 2), first loop run second time count-- is (2-1=1) and inner loop increment count three times (1+3=4). first loop run third time count--(4-1=3) and inner loop increment count three times which is 3+3=6 and loop end //second program a++ mean a==a+1 postincrement (assign value first and add 1 is ignored after that) if it is ++a preincrement.
8th Jul 2019, 4:04 PM
Dancode
Dancode - avatar