Professional Documents
Culture Documents
Bluej Term II Test 1
Bluej Term II Test 1
TERM-II , 1 TEST
CLASS : X , SUBJECT : COMPUTER
MARKS : 40
0 1 2 3 4 5
Size of A array
A. 5 B. 6 C. 24 D. 20
0 1 2 3 4 5
Capacity of A array
A. 5 B. 6 C. 24 D. 20
/* A program of Array */
import java.lang.System;
class mm
{
public static void main(String []args)
{
int p[]=new int[6];
p[]={10,20,30,40,50,60,};
for(i=0;i<=6;i++)
{
P[i]=a[i]+2;
}
System.out.println(p[4]);
}
13 Output 4
int A [] = new int [6];
A
4 5 63 87 4 25
0 1 2 3 4 5
// A program of Array
Import java.lang.*;
Class base
{
Public static void main(String args[])
{
int A [] = new int[6];
int p=10;
for(int i=1;i<=5;i++)
{
If(a[i]>3 || i%2==0)
{
A[i]=A[i]+10+p;
P++;
}
Else
{
A[i]=A[i]-2;
}
P++;
System.out.println(A[i]);
}
System.out.println(p)
}
}
BEST OF LUCK