v) Give the output of following program segment.
How may time the loop 12]
will be executed: int a, b, sum;
for(a=1, b=10; a<=b; a++,b--)
( sum+=a; [Link](sum));
vi) Rewrite the following for loop program segment using while: [2]
for (int i=10, f =1; i>=1; i--)
{ f *=i;
[Link]( f );
vii) Consider the following two-dimensional array answer the following [2]
questions:
int arril[]={{4,7,1},(1,5,3),(2,8,6}};
a)What is the order of the matrix?
b)Give output: [Link]( arr[ 11[3] * arr[2][1]);
viii) Joy wanted to count the number of digits in a given number without using [2]
loop. Write the correct statements to help him?
ix) Show the output of the following program segment? [2]
int a=2; int b=40;
while ( a<=10)
{
++ a;
[Link]( (++a +b--));
}
x) Give the output of the following code snippet: [2]
String x= "125.15";
String y= "100.06"
double a=Double. parseDouble(x);
double b=Double. parseDouble(y);
[Link]( a + b);