Font size
WorksheetsIEEE Coding Competition
Total questions: 13
Worksheet time: 23mins
What is the character position of "o" in "song"?
0
1
2
3
What data type would you use for storing the number of students in a class?
boolean
String
double
int
What will be the Output of the below code:
public class Demo{
public static void main(String[] arr){
}
public static void main(String arr){
}
}
Hi
Error
Nothing
Finite
What is the output of the below Java code snippet?
char ch = 'A';
int a = ch + 1;
ch = (char)a;
System.out.println(ch);
66
A
65
B
What is the size of float and double in java?
32 and 64
32 and 32
64 and 64
128 and 64
Select the valid statement.
char[] ch = new char()
char[] ch = new char[]
char[] ch = new char(5)
char[] ch = new char[5]
Identify the output of the following program.
String str = “abcde”;
System.out.println(str.substring(1, 3));
abc
bc
bcd
cd
100
Error
101
None
You need to run the code 10 times. Fill in the missing code parts:
for (int i = 0; (a) ; i++ ){
System.out.println(i);
}
Correct the following code to produce the following output:
**********
**********
**********
**********
for (int i = 1; i<=10; i++){
for (int j = 1; j<=5;j++){
System.out.print(j); }
System.out.println(); }
You need to print "IEEE" 5 times. Fill in the missing code parts:
int z = 10;
while (z > 0){
if (z%2 == 0)
System.out.println("IEEE");
}
What data type would you use for storing the emails of employees?
char
long
String
double
Write a code in any language to print IEEE like the picture shown (USE LOOPS).
