Examlex

Solved

What Is the Output of the Following Code Fragment

question 81

Multiple Choice

What is the output of the following code fragment?
Int i = 1;
Int sum = 0;
While (i <= 11)
{
Sum = sum + i;
I++;
}
System.out.println("The value of sum is " + sum) ;


Definitions:

Gigabyte

A unit of digital information storage or memory capacity equal to approximately one billion bytes (or 1,000 megabytes).

Megabyte

A unit of digital information storage or transmission comprised of approximately one million bytes (1,000 kilobytes or 1,024 kilobytes in binary).

Petabyte

A unit of information or computer storage equal to one quadrillion bytes or 1,024 terabytes, commonly used to measure data capacity on a large scale.

Terabyte

A unit of digital data storage equal to approximately 1 trillion bytes or 1024 gigabytes, often used to measure hard drive or memory capacity.

Related Questions