Output Questions for Class 10 ICSE Computer Applications
Java Arrays
Give the output of the following:
int m[] = {2,4,6,8}; System.out.println(m[1] + " " + m[2]);
View Answer113 Likes
Java Arrays
Give the output of the following:
int a[] ={2,4,6,8,10}; a[0]=23; a[3]=a[1]; int c= a[0]+a[1]; System.out.println("Sum = "+c);
View Answer116 Likes
Java Arrays
Give the output of the following:
int a[4]={2,4,6,8}; for(i=0;i<=1;i++) { s=a[i]+a[3-i]; System.out.println(s); }
View Answer102 Likes
Java Arrays
Give the output of the following:
int a[]=new int [5]; a[0]=4; a[1]=8; a[2]=7; a[3]=12; a[4]=3; System.out.println(a[2+1]);
View Answer102 Likes
Java Arrays
Give the output of the following program segment:
int n[] ={1,2,3,5,7,9,13,16}; double a=Math.pow(n[4], n[1]); double b=Math.sqrt(n[5]+n[7]); System.out.println("a=" + a); System.out.println("b=" + b);
View Answer22 Likes
Java Arrays
Give the output of the following program segment:
int x[] = {4, 3, 7, 8, 9, 10}; int p = x.length; int q = x[2] + x[5] * x[1]; System.out.println("p=" + p); System.out.println("q=" + q);
View Answer16 Likes
Java Math Lib Methods
Give the output of the following:
Math.sqrt(Math.max(9,16))View Answer37 Likes
Java Math Lib Methods
Predict the output of the following Java program snippet:
System.out.println(Math.floor(-4.7));
View Answer26 Likes
Java Math Lib Methods
Predict the output of the following Java program snippet:
System.out.println(Math.max(Math.ceil(14.55),15.5));
View Answer36 Likes
Java Math Lib Methods
Predict the output of the following Java program snippet:
System.out.println(Math.rint(-9.4)+Math.sqrt(9.0));
View Answer31 Likes
Showing 31 - 40 of 147 Questions