0 votes 0 votes Consider the following code: Which of the following represents the number of additions performed by above code? Algorithms algorithms time-complexity test-series + – rahul sharma 5 asked Dec 7, 2017 • edited Jul 16, 2022 by Anjana5051 rahul sharma 5 563 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply joshi_nitish commented Dec 8, 2017 reply Follow Share code? 0 votes 0 votes rahul sharma 5 commented Dec 8, 2017 reply Follow Share Added!!! 0 votes 0 votes saxena0612 commented Dec 8, 2017 reply Follow Share Same doubt i had : https://gateoverflow.in/162650/doubt 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes the loop wii execute from 1 to 8000 (20*20*20) in this half will be even and half will be odd so output will be 4000; which is equal to number of addition Red_devil answered Dec 8, 2017 Red_devil comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes i think this question is for no. of additions operation not value of d No. of additon operation is going to be:-) 4000(for executing d+1)+8000*2 (for (i+j)+k)) + 20+20*20+20*20*20 for i++ j++ and k++ respectively these are going to be:- 28420 ???? hs_yadav answered Dec 8, 2017 hs_yadav comment Share Follow See 1 comment See all 1 1 comment reply rahul sharma 5 commented Dec 8, 2017 reply Follow Share Yes you are right.It is already being asked as some one shared link above. 0 votes 0 votes Please log in or register to add a comment.