Question
class Main
{
public static void main(String args[]) {
int arr[] = {10, 20, 30, 40, 50};
for(int i=0; i < arr.length; i++)
{
System.out.print(" " + arr[i]);
}
}
}
a.
10 20 30 40 50
b.
Compiler Error
c.
10 20 30 40
d.
None of the above
Posted under Java Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What will be the output of the program?
Similar Questions
Discover Related MCQs
Q. What does a Data Type in Java refers to?
View solution
Q. Choose the wrong statement about Java programming?
View solution
Q. Which data type among the following is an implementation of Objects or OOPs?
View solution
Q. What is a Primitive Data Type in Java?
View solution
Q. Which among the following is not a Data Type in Java?
View solution
Q. Which among the following is not a valid Data Type in Java?
View solution
Q. Which is the data type used mostly to handle streams and buffers in Java language?
View solution
Q. Which is the data type that is not recommended for numeric applications in Java?
View solution
Q. Choose the number range for byte data type in Java?
View solution
Q. What is the size of a SHORT integer in Java?
View solution
Q. What is the size of an INT integer in Java?
View solution
Q. What is the size of a LONG integer in Java?
View solution
Q. What is the size of a FLOAT floating point number in Java?
View solution
Q. What is the size of a DOUBLE floating point number in Java?
View solution
Q. What is the size of a CHAR data type constant in Java?
View solution
Q. What is the size of a boolean data type constant in Java?
View solution
Q. What is the IEEE standard adopted to represent Floating point numbers in Java?
View solution
Q. What is the character encoding standard used in Java language?
View solution
Q. What is the abbreviation of ASCII?
View solution
Q. Choose the right statement about Java Data types.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!
Operating System
Dive deep into the core of computers with our Operating System MCQs. Learn about...
Java Programming
Level up your coding skills with our Java Programming MCQs. From object-oriented...