What will be the output of the following Java program?
public class array_output
{
public static void main(String args[])
{
int array_variable [] = new int[10];
for (int i = 0; i < 10; ++i) {
array_variable[i] = i/2;
array_variable[i]++;
System.out.print(array_variable[i] + " ");
i++;
}
}
}
0 2 4 6 8
1 2 3 4 5
0 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api
# | Quiz |
---|---|
1
Discuss
|
What will be the output of the following Java program?
Solution |
2
Discuss
|
What will be the output of the following Java program?
Solution |
3
Discuss
|
What will be the output of the following Java program?
Solution |
4
Discuss
|
Which of these can be returned by the operator &?
Solution |
5
Discuss
|
Which of these can not be used for a variable name in Java?
Solution |
6
Discuss
|
Which of these is long data type literal?
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved