what is the output of this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

what is the output of this code?

int main() { int a,b,c; a=2; for (b=2; b<5; b++) for (c=1; c<5; c+=2) a*=3; a=a*b+c; cout<<a++; } ................................................................................... options: 1) 7295 2) 7296 3)14580 4)5832

25th Oct 2023, 7:20 AM
Tay
6 Answers
+ 9
The best thing to try for these questions is to write the code into the code playground and run it.
25th Oct 2023, 7:27 AM
Ausgrindtube
Ausgrindtube - avatar
+ 4
Tay I tested your code, and the result is 7295, and I ran it several times with the same output every time.
25th Oct 2023, 8:38 AM
Jan
Jan - avatar
+ 3
option 1: 7295
25th Oct 2023, 4:10 PM
Alhaaz
Alhaaz - avatar
+ 2
I did but I got different result which is not in those 4 options.
25th Oct 2023, 7:44 AM
Tay
+ 1
Thank you.
25th Oct 2023, 11:02 AM
Tay
0
14580
26th Oct 2023, 1:56 PM
Gubba Nithish