1 votes 1 votes Number of addition performed by above code? Please explain this? Programming in C programming + – Rudra Pratap asked Oct 16, 2018 Rudra Pratap 312 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply Naveen Kumar 3 commented Oct 16, 2018 i edited by Naveen Kumar 3 Oct 16, 2018 reply Follow Share 8000+8000+4000=20000 times? 0 votes 0 votes Rudra Pratap commented Oct 16, 2018 reply Follow Share But the answer is 28420 in the test series 0 votes 0 votes Naveen Kumar 3 commented Oct 16, 2018 reply Follow Share Oops.. for i++,j++,k++ =20*20*20=8000 4000 times d=d+1 8000 times I+j+k, I.e., 16000 times + So, total + operation= 8k+4k+16k= 28000 times Where are those 420 0 votes 0 votes manisha11 commented Nov 15, 2018 reply Follow Share No. of additions : 20000 int main() { int d =0,i,j,k; int count = 0; for(i=1;i<=20;i++) for(j=1;j<=20;j++) for(k=1;k<=20;k++) if((i+j+k)%2 ==0){ d =d +1; count+=3; } else count+=2; printf("%d %d ",d,count); } 0 votes 0 votes Please log in or register to add a comment.