Java Practice Questions
Below is a set of distinct code statements.
a) System.out.println(sum+"\t"+sumsqr)) ab) double marks[10];
; ac) double [] marks=new double[10];
b) System.out.println(sum); ad) marks[c]=16.5+Math.ciel(Math.random()
c) public static double [] getMarks(){ 50);
d) public void double [] ae) System.out.println(Math.ciel(Math.rando
getMarks(double []){ m()*5);
e) int s=0; af) while(c<=150){
f) int c=1; ag) c++;
g) int sq=0; ah) System.out.println(c);
h) double marks[10]; ai) System.out.print(c;
i) double [] marks=new double[10]; aj) return double;
j) marks[c]=16.5+Math.ciel(Math.rando ak) sq=Math.pow(c,2);
m()50); al) System.out.println(i,+"\t"+sq);
k) System.out.println(Math.ciel(Math.ra am) while(c<=10){
ndom()*5); an) }
l) while(c<=150){ ao) if(c%2==0){
m)c++; ap) int sumsqr=0;
n) System.out.println(c); aq) sumsqr+=c*c;
o) System.out.print(c; ar) Scanner myinput=new Scanner();
p) return double; return marks;
q) sq=Math.pow(c,2); as) if(c/2==1){
r) System.out.println(i,+"\t"+sq); at) {
s) while(c<=10){ au) sum+=c;
t) } av) Math.abs(i%7);
u) System.out.println(sum+"\t"+sums aw) if(c%2==1){
qr));
v) System.out.println(sum);
w) public static double [] getMarks(){
x) public void double []
getMarks(double []){
y) int s=0;
z) int c=1;
aa) int sq=0;
a. Arrange the appropriate lines of code separated by a coma(,) from the set
above that can be used in a program to print integers 1 – 10 horizontally
separated by a tab. Draw the corresponding flow chart
b. Arrange the appropriate lines of code separated by a coma(,) from the set
above that can be used in a program to print integers 1 – 10 vertically and their
sum. Draw the corresponding flow chart
Below is a set of distinct code statements.
a) System.out.println(sum+"\t"+sumsqr)) ab) double marks[10];
; ac) double [] marks=new double[10];
b) System.out.println(sum); ad) marks[c]=16.5+Math.ciel(Math.random()
c) public static double [] getMarks(){ 50);
d) public void double [] ae) System.out.println(Math.ciel(Math.rando
getMarks(double []){ m()*5);
e) int s=0; af) while(c<=150){
f) int c=1; ag) c++;
g) int sq=0; ah) System.out.println(c);
h) double marks[10]; ai) System.out.print(c;
i) double [] marks=new double[10]; aj) return double;
j) marks[c]=16.5+Math.ciel(Math.rando ak) sq=Math.pow(c,2);
m()50); al) System.out.println(i,+"\t"+sq);
k) System.out.println(Math.ciel(Math.ra am) while(c<=10){
ndom()*5); an) }
l) while(c<=150){ ao) if(c%2==0){
m)c++; ap) int sumsqr=0;
n) System.out.println(c); aq) sumsqr+=c*c;
o) System.out.print(c; ar) Scanner myinput=new Scanner();
p) return double; return marks;
q) sq=Math.pow(c,2); as) if(c/2==1){
r) System.out.println(i,+"\t"+sq); at) {
s) while(c<=10){ au) sum+=c;
t) } av) Math.abs(i%7);
u) System.out.println(sum+"\t"+sums aw) if(c%2==1){
qr));
v) System.out.println(sum);
w) public static double [] getMarks(){
x) public void double []
getMarks(double []){
y) int s=0;
z) int c=1;
aa) int sq=0;
a. Arrange the appropriate lines of code separated by a coma(,) from the set
above that can be used in a program to print integers 1 – 10 horizontally
separated by a tab. Draw the corresponding flow chart
b. Arrange the appropriate lines of code separated by a coma(,) from the set
above that can be used in a program to print integers 1 – 10 vertically and their
sum. Draw the corresponding flow chart