Challenger App

No.1 PSC Learning App

1M+ Downloads

What is the value of sum after the execution of the following code?

int sum = 0;

for (int i = -5; i<=;i++)

{

         if (!i) break;

         sum += i;

}

 

 

A0

B-5

C-15

D15

Answer:

C. -15

Read Explanation:

sum = -15


Related Questions:

Identify the HTML section that contains the content displayed in the browser window.
C++ ലാംഗ്വേജിൽ കീവേഡ് അല്ലാത്തത് ?
Pick out OOP language from the following :
What is the correct JavaScript syntax to write "Hello World"?
ഫ്ലോ ചാർട്ട് ഒരു തരം _____ ആണ്.